AWS Default Cleaner - default VPC, default subnets, default internet gateway and etc
Project description
Introduction
aws-default-cleaner
is a command line tool to delete default VPCs, subnets and internet gateways from your AWS account
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 in the AWS account and outputs VPC ids (no objects deleted)delete
command tries to delete default VPCs and associated subnets and internet gateways
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 --assume
or -a
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aws-default-cleaner-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2ae92d3c42732ef3bde1e40d9ac45cba68c40821184b7aa22187f3b4eed6d1 |
|
MD5 | a0e581cb19ad3a4f4dd7fffacc11d910 |
|
BLAKE2b-256 | 347bfa77264329c4cf8030806f8fda42860432ff2e739a6a87df3434ab4b3580 |
Hashes for aws_default_cleaner-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1089871fec362026696abbc1b8d2d2b9381d67f37ebf7bb9348210c468266d1d |
|
MD5 | 5fea3963c332388cc80e7ebd7e263981 |
|
BLAKE2b-256 | 64c71660744ec0eafa6cc0ecef7c9429fc764c454b9db0fd06d8eefa3d654f6e |