6
我可以在管理控制檯中用iam-role啓動ec2-instance。 但我不知道如何與AWS-紅寶石SDK如何使用iam角色啓動ec2-instance?
iam-role " test"'s Policy is here
"Effect": "Allow",
"Action": "*",
"Resource": "*"
這裏IAM角色推出EC2實例是結果:
/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)