Skip to content

Instantly share code, notes, and snippets.

@guilhermef
Last active May 21, 2020 10:47
Show Gist options
  • Save guilhermef/f432c379a536bed73603030752bc83fa to your computer and use it in GitHub Desktop.
Save guilhermef/f432c379a536bed73603030752bc83fa to your computer and use it in GitHub Desktop.
Read only ECR policy for organization
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "ECR Read Only",
"Effect": "Allow",
"Principal": {
"type": "*",
"identifiers": ["*"]
},
"condition": {
"test": "StringLike",
"variable": "aws:PrincipalOrgID",
// This is our organization-wide identifier which can be found after
// log-in to AWS: <https://console.aws.amazon.com/organizations/home>
"values": [
"o-REDACTED"
]
},
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:GetRepositoryPolicy",
"ecr:DescribeRepositories",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:BatchGetImage",
"ecr:DescribeImageScanFindings"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment