AWS CodeBuild Role访问ECR权限
在CodeBuild创建Project的时候需要创建新的role,当project创建好了之后,role也会跟着创建先,这个时候就需要去到IAM选择已经创建的好role,添加以下ECR访问权限
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Action": [
"ssm:GetParameters",
"ecr:BatchCheckLayerAvailability",
"ecr:CompleteLayerUpload",
"ecr:GetAuthorizationToken",
"ecr:InitiateLayerUpload",
"ecr:PutImage",
"ecr:UploadLayerPart",
"ecr:BatchGetImage",//拉取image所需权限
"ecr:GetDownloadUrlForLayer"//拉取image所需权限
],
"Resource": "*"
}
]
}
Facebook评论