Created
July 21, 2020 19:29
-
-
Save kmcquade/0cf4bc92a91aec8222c05e515974d62c to your computer and use it in GitHub Desktop.
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": "PreventMarketplaceImages", | |
"Action": [ | |
"ec2:RunInstances" | |
], | |
"Effect": "Deny", | |
"Resource": "arn:aws:ec2:*::image/ami-*", | |
"Condition": { | |
"StringNotEquals": { | |
"ec2:Owner": "${aws:PrincipalAccount}" | |
} | |
} | |
}, | |
{ | |
"Sid": "PreventCopyImages", | |
"Action": [ | |
"ec2:CopyImage" | |
], | |
"Effect": "Deny", | |
"Resource": "*", | |
"Condition": { | |
"StringNotEquals": { | |
"ec2:Owner": "${aws:PrincipalAccount}" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment