Last active
May 21, 2020 10:47
-
-
Save guilhermef/f432c379a536bed73603030752bc83fa to your computer and use it in GitHub Desktop.
Read only ECR policy for organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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