管理コンソールでiam-roleを使用してec2-instanceを起動できます。しかし、aws-ruby-sdkからiam-roleを使用してec2-instanceを起動する方法がわかりません。
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)