简体   繁体   中英

Which resource arn to use in Aws Codepipeline ECS IAM permission?

I am following AWS's code pipeline documentation for Iam permissions. According to the docs these are the minimum permissions for ECS standard deployment.

{
    "Effect": "Allow",
    "Action": [
        "ecs:DescribeServices",
        "ecs:DescribeTaskDefinition",
        "ecs:DescribeTasks",
        "ecs:ListTasks",
        "ecs:RegisterTaskDefinition",
        "ecs:UpdateService"
    ],
    "Resource": "resource_ARN"
},

I am confused about which resource arn I am supposed to use. Is it the task definition's or ECS service's arn I should be using?

"Resource" : [
    "arn:aws:ecr:us-east-1:808394661234:repository/myrepositoryname"
]

Where you will want to check the us-east-1 part to match your region. The number will have to match your Account ID. To get that go to the top right menu to get the Account ID. Just remove any - . Then lastly the myrepositoryname should match the name you used to create the ECR for instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM