AWS EC2 Resource Level , Initialization Failed

点点圈 提交于 2020-01-17 01:25:30

问题


I use this Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1385026304010",
            "Effect": "Allow",
            "Action": [
                "ec2:RunInstances"
            ],
            "Condition": {
                "StringEquals": {
                    "ec2:InstanceType": "t2.medium"
                }
            },
            "Resource": [
                "arn:aws:ec2:us-east-1:*:instance/*",
                "arn:aws:ec2:us-east-1:*:image/ami-81c603ea",
                "arn:aws:ec2:us-east-1:*:key-pair/CodeDeploy",
                "arn:aws:ec2:us-east-1:*:security-group/sg-5ace243d",
                "arn:aws:ec2:us-east-1:*:volume/*"
            ]
        }
    ]
}

But it show error message , Initialization failed . I see this example in aws Documentation but dont understand why this problem happen.

Decoded message

{
  "allowed": false,
  "explicitDeny": false,
  "matchedStatements": {
    "items": []
  },
  "failures": {
    "items": []
  },
  "context": {
    "principal": {
      "id": "AIDAJXOEQNA64A677DGQO",
      "name": "DevOps1",
      "arn": "arn:aws:iam::955246940111:user/DevOps1"
    },
    "action": "ec2:RunInstances",
    "resource": "arn:aws:ec2:us-east-1:955246940111:key-pair/CodeDeploy",
    "conditions": {
      "items": [
        {
          "key": "ec2:Region",
          "values": {
            "items": [
              {
                "value": "us-east-1"
              }
            ]
          }
        }
      ]
    }
  }
}

来源:https://stackoverflow.com/questions/31079495/aws-ec2-resource-level-initialization-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!