2017-12-21 11 views
0

* /ローカルのみ/ *で動作するラムダスクリプトで作業しています。AWS IAMポリシー:正しいものを定義する

このスクリプトの使用を別の地域で拡張したいと思います。これを行うには 、私は私のスクリプトを更新したいので、私は始めている:

print(ec2c.describe_regions()) 

私はそれをテストするとき、それは言う:

module initialization error: An error occurred (UnauthorizedOperation) when calling the DescribeRegions operation: You are not authorized to perform this operation.

しかし、私のポリシーは、EC2が含まれていますDescribeRegionsアクション内:

{ 
    "roleName": "ec2_scan_role", 
    "policies": [ 
    { 
     "document": { 
     "Version": "2012-10-17", 
     "Statement": [ 
      { 
      "Sid": "VisualEditor0", 
      "Effect": "Allow", 
      "Action": [ 
       "ec2:DescribeInstances", 
       "ec2:StartInstances", 
       "ec2:DescribeRegions", 
       "ec2:StopInstances", 
       "ec2:DescribeInstanceStatus" 
      ], 
      "Resource": "*" 
      } 
[...] 

何が問題なのですか?

おかげで、

答えて

0

ハム、

は、私は地域に関する情報を見つけました:

https://github.com/spulec/moto/issues/1361

たぶん、根本的な原因?

+0

最後にそれは原因ではありませんでした...私はそれを見つけられませんでした:) – GJE

関連する問題