What happens when you delete the default VPC and why might you?
BeginnerScenarioVPC and Networking
Answer
Situation read → Default VPCs have public subnets and permissive defaults that bypass your network design.
What I'd do →
- Delete in every region via CLI, including subnets, IGW and the VPC
- Prevent recreation of workloads in them using an SCP and detect with Config
- If needed,
aws ec2 create-default-vpcrestores it
Why → Removing it prevents people launching instances into an unmanaged, internet-routable network.
Interview tip → Mention doing it for all regions, not just the one you use.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner