Last active
March 27, 2023 03:59
-
-
Save spasam/8bc38eb591ad3b72603f57293ed5f138 to your computer and use it in GitHub Desktop.
Disallow internet access for an Amazon Virtual Private Cloud (VPC) instance managed by a customer, rather than by an AWS service
This file contains 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": "GRDISALLOWVPCINTERNETACCESS", | |
"Effect": "Deny", | |
"Action": [ | |
"ec2:CreateInternetGateway", | |
"ec2:AttachInternetGateway", | |
"ec2:CreateEgressOnlyInternetGateway", | |
"ec2:AttachEgressOnlyInternetGateway", | |
"ec2:CreateDefaultVpc", | |
"ec2:CreateDefaultSubnet", | |
"ec2:CreateCarrierGateway" | |
], | |
"Resource": [ | |
"*" | |
], | |
"Condition": { | |
"ArnNotLike": { | |
"aws:PrincipalArn": [ | |
"arn:aws:iam::*:role/AWSControlTowerExecution" | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment