Created
September 15, 2020 07:32
-
-
Save davidwebstar34/eebdc25ad165fdcfb13c5e3940b0bafd to your computer and use it in GitHub Desktop.
SCP deny AMIs
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": "2020-06-01", | |
"Statement": [ | |
{ | |
"Sid": "DenyAMIsExceptFromAccount", | |
"Effect": "Deny", | |
"Action": "ec2:RunInstances", | |
"Resource": "arn:aws:ec2:eu-west-1::image/{ami_id}", | |
"Condition": { | |
"StringNotEquals": { | |
"ec2:Owner": "{imagebuilder_account_id}", "{shared_account_id}" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment