EC2 VPC Block Public Access settings should block internet gateway traffic
Verifies that VPC Block Public Access is on in this Region in Bidirectional or Ingress-only mode. It is one switch per account and Region that blocks internet gateway traffic to the Region's VPCs whatever their route tables, security groups and network ACLs allow, except for the VPCs and subnets you exclude.
- service
- EC2
- severity
- Medium
- scope
- evaluated in every region
How to fix it
In the console
VPC → Settings → Block public access → Edit public access settings
With the AWS CLI
aws ec2 modify-vpc-block-public-access-options --internet-gateway-block-mode block-bidirectional --region <region>With Terraform
resource "aws_vpc_block_public_access_options" "this" {
internet_gateway_block_mode = "block-bidirectional"
}
See which of your accounts this check is failing on.
Book a demo