调用StartInstances操作时发生客户端错误(UnauthorizedOperation)

时间:2016-01-21 03:13:38

标签: python amazon-web-services amazon-ec2 amazon-iam

我只是添加了一个ID实例i-b2117a3c的新实例。我在下面运行这些命令。

aws ec2 start-instances --instance-ids i-b2117a3c

aws ec2 start-instances --instance-ids i-1721b699

但结果如下图所示:

enter image description here

A client error (UnauthorizedOperation) occurred when calling the
StartInstances operation: You are not authorized to perform this
operation.  Encoded authorization failure message: 
GJgQdcdGg4iYettPm2itv1SsHjBnkbssuu7re1vk6wcdh-5k1RHmsF09AlI8onB5TYvKZ4qJQ-Bt_-sXMXc5VUmKMAMXHy6DxyAXXkSRkamyOHrrBoat8hJNRUdyzXpWevtAukktDhg-K4uVDfDFtBJRc9PNA-9tg9ei5JUA_-uUMfmcphk3f72g94irJawvW4VJyWx6w-U-_wWUKJHUNL8eVWvq_3VYxWBdr4QhEZcpVAsFBObTglxheCoQGVGZ1UNw-B9B4nbldgD_rp-QUttAMQJFAwowZR5DEYXbhanV__Adjk1r_R5ZiBRSoe-MzZyjJlsHKM5NeJGl1SrgROltuiXy1fYL10feo3fd-WReGPp_GffEUqbUTaZmb4YvwX7xo6kkvreqMLNjO_7P63Bl8b1_MsneOVorlmER7E76qj0UBWcH7iiJa4e6DCQWzWZ1LUCMzHgqpiW_6s2v64_tvcrVF1U4pTWLUAvXd4NPEUjfDWFILqrhrh1Sp1ljrRGb8hD4E8U3HpGVeHXNiVJ2R60vsO0WJZiRiUoKzvTofQp1o-Ne4_MdburZJxhdb6lWpdPD63m6MFd5LeR8azbfWTOAXx2

我可以向i-b2117a3c添加政策。怎么做?

1 个答案:

答案 0 :(得分:1)

您的IAM用户无权启动实例。你能为用户查看IAM政策吗?

您可以通过调用

来解码错误消息
aws sts decode-authorization-message --encoded-message <encoded-message>