我可以在管理控制台中使用IAM角色启动EC2实例。但是,我不知道如何从AWS-Ruby-SDK启动带有IAM角色的EC2实例。
iam-role " test"'s Policy is here
"Effect": "Allow",
"Action": "*",
"Resource": "*"
这里是结果:
/var/lib/gems/1.8/gems/aws-sdk-1.7.1/lib/aws/core/client.rb:318:in `return_or_raise':
You are not authorized to perform iam:PassRole with arn:aws:iam::xxxxxxxxxxx:role/test
(AWS::EC2::Errors::UnauthorizedOperation)