Created
October 19, 2020 15:59
-
-
Save kmcquade/2e8f87a82db2d30baa90dfdecba29a3c to your computer and use it in GitHub Desktop.
image-baking-enforcement-scp.json
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": "EnforceApprovedImageOwners", | |
"Action": [ | |
"ec2:RunInstances" | |
], | |
"Effect": "Deny", | |
"Resource": "arn:aws:ec2:*::image/ami-*", | |
"Condition": { | |
"StringNotEquals": { | |
"ec2:Owner": [ | |
"000000000000", # Approved image baking account | |
"111111111111", # Any other accounts that you want to allow image baking from | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment