GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ps-ops/vpc-delete: Remove AWS Default VPCs

This repository was archived by the owner on Jul 15, 2025. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
.psmetadata
.psmetadata
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
remove_default_vpc.py
remove_default_vpc.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Remove AWS Default VPCs

This Python script attempts to delete the AWS default VPC in each region.

Requirements:

  • Tested with:
    • Python version: 3.8.1
    • Boto3 version: 1.18.29
    • Botocore version: 1.21.29
  • Valid AWS API keys/profile

Usage:

If using aws_okta_keyman, your default AWS CLI profile will be overwritten with the current session. If using an authentication method other than aws_okta_keyman, you may need to pass in a specific profile using the -p flag. The script will use your default profile if the -p flag is omitted.

python remove_default_vpc.py

You are logged in as arn:aws:sts::<ACCOUNT_ID>:assumed-role/<ROLE_NAME>/<SESSION_NAME>

If the above user/account are correct, enter 'yes' to attempt to delete resources: yes

Output:

2021-08-26 15:58:14 WARNING  VPC vpc-ddacdca0 has existing network interfaces in the us-east-1 region and will be skipped.
2021-08-26 15:58:15 WARNING  No Subnets found in vpc-f2880199
2021-08-26 15:58:15 WARNING  Deleting launch wizard security group: launch-wizard-3 sg-066cfefce69c82a6c in VPC: vpc-f2880199
2021-08-26 15:58:16 WARNING  Deleting launch wizard security group: launch-wizard-1 sg-0727d511a2783f71d in VPC: vpc-f2880199
2021-08-26 15:58:16 WARNING  Deleting launch wizard security group: launch-wizard-2 sg-08fb56da0b1f15361 in VPC: vpc-f2880199
2021-08-26 15:58:16 WARNING  Deleting VPC: vpc-f2880199 in region us-east-2

References:

  • https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html

About

Remove AWS Default VPCs

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.