Identify unused AWS VPCs
It is recommended to delete these VPCs that do not have resources attached to them to reduce AWS cost.
Risk Level: Low
Cloud Entity: Amazon VPC
CloudGuard Rule ID: D9.AWS.OPE.10
Covered by Spectral: Yes
Category: Compute
GSL LOGIC
VPC should have subnets length()>=1
REMEDIATION
From Portal
- Log in to the AWS console.
- In the console, select the specific region.
- Navigate to VPC Dashboard.
- Click 'Your VPCs' and select the reported VPC.
- If you want to use the reported VPC, associate subnets to the VPC.
- If you want to delete the VPC, click 'Actions' and select 'Delete VPC' from the dropdown.
From Command Line
Use following command to delete a unused VPC:
aws ec2 delete-vpc --vpc-id vpc_id
References
- https://docs.aws.amazon.com/vpc/latest/userguide/working-with-vpcs.html#VPC_Deleting
- https://docs.aws.amazon.com/vpc/latest/userguide/working-with-subnets.html
- https://docs.aws.amazon.com/prescriptive-guidance/latest/aws-startup-security-baseline/acct-09.html
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-vpc.html
Amazon VPC
Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define. You have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateways. You can use both IPv4 and IPv6 in your VPC for secure and easy access to resources and applications.
Compliance Frameworks
- AWS CSA CCM v.4.0.1
- AWS CloudGuard Best Practices
- AWS CloudGuard Well Architected Framework
- AWS HITRUST
- AWS ITSG-33
- AWS MAS TRM Framework
- AWS MITRE ATT&CK Framework v10
- AWS MITRE ATT&CK Framework v11.3
- CloudGuard AWS All Rules Ruleset
Updated about 1 year ago