Not authorized to start new instances

0

I have an EC2 instance with an IAM role attached that has the AmazonEC2FullAccess policy attached. This policy includes full access to runInstances. However, when I try run call runInstances from the instance (through the JavaScript SDK), in order to launch new instances, I get an error: ”UnauthorizedOperation: You are not authorized to perform this operation.” What is the problem here?

已提問 5 年前檢視次數 730 次
2 個答案
0
已接受的答案

Hello,

The 'You are not authorized to perform this operation' error should be accompanied with its related 'Encoded authorization failure message'. You can then decode the message using decodeAuthorizationMessage [1] to see what went wrong specifically.

Hope that this information helps to solve your issue.

Links:
[1] https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#decodeAuthorizationMessage-property

Regards,
awstomas

AWS
已回答 5 年前
0

Hi,
Thanks for your reply. Now, I have decoded the message, using your link, and can see that an IAM permission was further needed to launch the new instances. Thanks.

已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南