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": "*"
}
[...]
何が問題なのですか?
おかげで、
最後にそれは原因ではありませんでした...私はそれを見つけられませんでした:) – GJE