Last active
May 29, 2022 17:13
-
-
Save kmcquade/c6f1c942079e6fabe836d1f51303f452 to your computer and use it in GitHub Desktop.
The Policy below prevents the account from self-managing container images. Users and Roles in the account cannot upload any container images unless the registry is owned by an approved ECR account ID.
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PreventSelfManagedImages", | |
"Action": [ | |
"ecr:BatchDeleteImage", | |
"ecr:CompleteLayerUpload", | |
"ecr:Create*", | |
"ecr:Delete*", | |
"ecr:Initiate*", | |
"ecr:Put*", | |
"ecr:Set*", | |
"ecr:Start*", | |
"ecr:Upload*" | |
], | |
"Effect": "Deny", | |
"Resource": "*", | |
"Condition": { | |
"StringNotEquals": { | |
"aws:PrincipalAccount": ["approved_ecr_account_id"] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment