Skip to content

Instantly share code, notes, and snippets.

@tonyprawiro
Created June 16, 2017 02:40
Show Gist options
  • Save tonyprawiro/41e15215a806d2973862b214f1d2f5ee to your computer and use it in GitHub Desktop.
Save tonyprawiro/41e15215a806d2973862b214f1d2f5ee to your computer and use it in GitHub Desktop.
ECR repository policy
{
"Statement": [
{
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
"ecr:PutImage",
"ecr:InitiateLayerUpload",
"ecr:UploadLayerPart",
"ecr:CompleteLayerUpload",
"ecr:DescribeRepositories",
"ecr:GetRepositoryPolicy",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:DeleteRepository",
"ecr:BatchDeleteImage",
"ecr:SetRepositoryPolicy",
"ecr:DeleteRepositoryPolicy"
],
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::1234567890:user/john_smith"
},
"Sid": "1"
},
{
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
"ecr:PutImage",
"ecr:InitiateLayerUpload",
"ecr:UploadLayerPart",
"ecr:CompleteLayerUpload",
"ecr:DescribeRepositories",
"ecr:GetRepositoryPolicy",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:DeleteRepository",
"ecr:BatchDeleteImage",
"ecr:SetRepositoryPolicy",
"ecr:DeleteRepositoryPolicy"
],
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::9876543210:user/jane_doe"
},
"Sid": "2"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment