Other Articles
- Secure AWS Deployments with OIDC
- Build Secure Network Subnet Topology
- Instance/Host Roles in AWS
- Enable AWS GuardDuty for Threat Detection
- AWS CloudTrail: API Logging and Activity Monitoring
- Data Protection Using Envelope Encryption
- Restricting SSH Access on AWS Using IP Whitelisting
- GitHub – Enabling and Managing Dependabot Scans
- Secure Build Pipeline Controls: How to Protect Your CI/CD Process
- Production Access Control and Management
- Infrastructure Environment Segmentation and Access Management
Removing Default VPCs and Blocking Their Recreation with an AWS SCP
Overview
This article explains how to delete the default VPCs that AWS creates in every region and how to use a Service Control Policy (SCP) in AWS Organizations to prevent them from being recreated.
Most teams use only one or two regions, but AWS creates a default VPC in every enabled region. Removing unused default VPCs and blocking their recreation helps keep your network footprint intentional.
What is a Default VPC?
A default VPC is a ready-made network that AWS automatically creates in each region of your account. It comes with public subnets, an internet gateway, and a fixed CIDR range (172.31.0.0/16), allowing resources to be launched without any network setup.
A Service Control Policy (SCP) is an AWS Organizations policy that sets the maximum permissions for the accounts to which it is attached. A "Deny" statement in an SCP applies to every user and role in the affected account, including administrators.
Why Remove Default VPCs?
- Default subnets are public, so resources launched into them without proper precautions may become accessible from the internet.
- Resources can be created in regions that nobody monitors because default VPCs make it easy to launch resources there.
- Every default VPC uses the same CIDR range, which can cause overlapping network ranges when you connect networks later.
- Removing default VPCs supports network segregation requirements under frameworks such as ISO 27001.
- AWS security guidance recommends deleting default VPCs in all regions, not just those in which you deploy resources.
Benefits
- Teams must create purpose-built VPCs with carefully defined network settings.
- There are fewer resources to manage and audit.
- Enforcing the SCP prevents a deleted default VPC from being recreated through the denied actions.
- AWS Organizations and SCPs are available at no additional charge.
How It Works
1. Audit Each Region
Before deleting a default VPC, check that no resources depend on it. Network interfaces can help identify resources associated with services such as EC2, RDS, load balancers, Lambda functions running in a VPC, and NAT gateways.
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
vpc=$(aws ec2 describe-vpcs --region $region --filters Name=isDefault,Values=true \
--query "Vpcs[0].VpcId" --output text)
[ "$vpc" = "None" ] && { echo "$region no default VPC"; continue; }
eni=$(aws ec2 describe-network-interfaces --region $region \
--filters Name=vpc-id,Values=$vpc --query "length(NetworkInterfaces)" --output text)
echo "$region $vpc network-interfaces: $eni"
done
Delete a default VPC only when its network interface count is 0 and you have confirmed that no other dependencies remain.
2. Delete the Default VPCs
- Open VPC → Your VPCs in the relevant region.
- Select the VPC marked Default VPC: Yes.
- Choose Actions → Delete VPC. The console also removes the attached internet gateway and subnets.
- Repeat these steps for each region, keeping the default VPCs in regions you actively use.
3. Create the SCP
From your organization's management account, navigate to AWS Organizations → Policy management → Service control policies. Enable SCPs first if necessary. Then, create a policy named deny-default-vpc-creation and use the following JSON:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyDefaultVpcCreation",
"Effect": "Deny",
"Action": [
"ec2:CreateDefaultVpc",
"ec2:CreateDefaultSubnet"
],
"Resource": "*"
}
]
}
4. Attach the SCP
- Open the policy and navigate to the Targets tab.
- Choose Attach and select the accounts or organizational unit (OU) you want to protect.
- Start with a test account and expand the policy's scope after confirming that it works as expected.
5. Test the Policy
In a member account to which the SCP is attached, select a region where you deleted the default VPC. Then, choose Actions → Create default VPC, or run aws ec2 create-default-vpc --region <region>. The request should fail with an error message indicating an explicit deny in a service control policy.
Common Use Cases
- Hardening a new AWS Organization before teams begin deploying resources.
- Cleaning up older accounts that still have default VPCs in unused regions.
- Meeting audit requirements for network segregation and controlled resource placement.
- Standardizing on custom VPCs built through Terraform or CloudFormation.
Example Scenario
- A company operates only in the Mumbai region, but its account has default VPCs in 17 other regions.
- The audit confirms that there are no network interfaces in those default VPCs.
- The team deletes the default VPCs in the unused regions while retaining the one in Mumbai.
- An SCP denying ec2:CreateDefaultVpc and ec2:CreateDefaultSubnet is attached to the member accounts.
- A test attempt to recreate a default VPC fails because the SCP explicitly denies the request.
Best Practices
- Audit each region first, and delete only default VPCs that have no network interfaces or other dependencies.
- Check Terraform and CloudFormation code for references to the default VPC before deleting it.
- Test the SCP on a single non-production account before attaching it at the root level.
- Once the policy is confirmed to work, attach it to the appropriate OU or root to cover the intended accounts.
- Restrict who can enable new AWS regions, as unused regions can become sources of unmanaged resources.
- Include default VPC cleanup in the onboarding process for every new account and newly enabled region.
Common Mistakes to Avoid
- Deleting a default VPC without checking for resources or code that depends on it.
- Assuming that the SCP removes existing default VPCs. It only blocks the specified creation actions.
- Forgetting that SCPs do not restrict the management account. Default VPCs in that account must be deleted manually.
- Expecting the SCP to prevent AWS from automatically creating default VPCs for new accounts or newly enabled regions. Plan to delete those VPCs after they are created.
- Testing the SCP in the management account, where SCP restrictions do not apply.
Updated on 26 October, 2026