Interview Prep/AWS/VPC and Connectivity

Cannot delete a VPC: `The vpc has dependencies and cannot be deleted`.

BeginnerTroubleshootingVPC and Connectivity
Answer

Likely causes → ENIs, endpoints, NAT or gateways still exist.

Diagnose →

aws ec2 describe-network-interfaces --filters Name=vpc-id,Values=vpc-0abc
aws ec2 describe-vpc-endpoints --filters Name=vpc-id,Values=vpc-0abc
aws ec2 describe-nat-gateways --filter Name=vpc-id,Values=vpc-0abc

Fix →

  1. Delete dependencies in order: instances, endpoints, NAT, IGW, subnets, SGs, route tables, VPC

Prevent → Manage VPCs with IaC for clean teardown.

aws All AWS questions Roadmap: AWS core services

More on VPC and Connectivity