Skip to content

Instantly share code, notes, and snippets.

@ritesh
Created June 16, 2017 10:35
Show Gist options
  • Save ritesh/a09a3d23ab4bdacaa4889260e6d375b4 to your computer and use it in GitHub Desktop.
Save ritesh/a09a3d23ab4bdacaa4889260e6d375b4 to your computer and use it in GitHub Desktop.
Disallow editing of certain security groups using Resource based policies
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DisallowEditingGroups",
"Effect": "Deny",
"Action": [
"ec2:AuthorizeSecurityGroupIngress",
"ec2:AuthorizeSecurityGroupEgress"
],
"Resource": [
"arn:aws:ec2:region:account:security-group/groupID1",
"arn:aws:ec2:region:account:security-group/groupID2"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment