Skip to main content

Introduction

aws-default-cleaner is a command line tool to delete default AWS account resources:

  • VPCs
  • Subnets
  • Internet Gateways
  • Route Tables
  • Network ACLs
  • Security Groups

Installation

Install package using pip package-manager

pip install aws-default-cleaner

Usage

Basic usage

Currently this tool supports two operations: discover and delete.

  • discover command searches for default VPCs and other resources in the AWS account and outputs ids (no objects deleted)
  • delete command tries to delete default VPCs and associated Subnets, Internet Gateways, Route Tables, Network ACLs and Security Groups

Example:

aws-default-cleaner discover
aws-default-cleaner delete

Assuming role

When you use multi-account setup with central IAM account and specific roles in spoke accounts, you can force aws-default-cleaner to assume role before performing any operations. Simply supply one or more --assume or -a flags with the corresponding role names.

Example:

aws-default-cleaner discover -a arn:aws:iam::account-one-id:role/infra-admin-assumerole -a arn:aws:iam::account-two-id:role/infra-admin-assumerole
aws-default-cleaner delete -a arn:aws:iam::XXXXXXXXXXXX:role/infra-admin-assumerole

Region filtering

By default aws-default-cleaner will search for the default resources in the all available regions, but you can override this behavior by supplying --region or -r flags.

Example:

aws-default-cleaner discover -r eu-central-1 -r eu-west-3
aws-default-cleaner delete -r eu-central-1 -r eu-west-3

Metadata

Release files for aws-default-cleaner 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-default-cleaner 1.0.4
File Size Uploaded
aws-default-cleaner-1.0.4.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-default-cleaner 1.0.4
File Interpreter ABI Platform
aws_default_cleaner-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / aws-default-cleaner-1.0.4.tar.gz

Download URL aws-default-cleaner-1.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
313ea5ecefcd6252df58a11f8838f0b1725cf055da6a582841f944794d3f7c7a
BLAKE2b-256 checksum
How to use checksums
c2c40a4de073263e76c9c05dbfe215b1fc7a8fc74a0c9690f990d80cb83d1a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Release files / aws_default_cleaner-1.0.4-py3-none-any.whl

Download URL aws_default_cleaner-1.0.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c755f31f07884609359c74e1a3e95b992ba822fcdea0f84572c63e2f4ffb239a
BLAKE2b-256 checksum
How to use checksums
5d3fca1c4b780d16a87b576e6e0ba69d062b94da7d9be0c9a2a2f870e442fd37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page