Skip to main content

AWS Toolbox

Project description

AWS Toolbox

AWS Toolbox extends the AWS CLI commands with some handy solutions, such as executing a command on every region and resources matching a given pattern.

Installation

pip install aws-toolbox

Usage

DryRun Mode

Every command can be executed in dryrun mode, by adding the option --dryrun. With dryrun mode, the actual AWS operations will be logged but not executed.

For example:

~> aws-toolbox s3 delete-bucket --name "integ-tests-.*" --dryrun
INFO:aws_toolbox.commands.s3.delete_bucket:Deleting Buckets with name pattern integ-tests-.*, dryrun True
INFO:botocore.credentials:Found credentials in shared credentials file: ~/.aws/credentials
INFO:aws_toolbox.commands.s3.delete_bucket:The following 2 buckets would be deleted, but dryrun mode is enabled and nothing will be done: test-1, test-2, test-3

S3

Delete (emptying, if necessary) all buckets whose name matches the provided regular expression:

aws-toolbox s3 delete-bucket \
  --name "cdk-hnb659fds-assets-319414405305-(?\!us-east-1|eu-west-1)"

Secrets Manager

List all secrets whose name and regions match the provided regular expressions:

aws-toolbox secretsmanager list-secrets \
  --region "us-west-.*" \
  --name ".*"

Delete all secrets whose name and regions match the provided regular expressions:

aws-toolbox secretsmanager delete-secrets \
  --region "us-west-.*" \
  --name "Sample.*"

EC2 AMIs

aws-toolbox ec2 delete-ami \
  --region "eu-.*" \
  --owners 319414405305 \
  --name ".*aws-parallelcluster.*" \
  --before 2023-06-01T00:00:00.000Z

EC2 Snapshots

Delete (emptying, if necessary) all snapshots whose name matches the provided regular expression:

aws-toolbox ec2 delete-snapshot \
  --region "eu-.*" \
  --owners 319414405305 \
  --description "Copied for DestinationAmi .*"

CloudFormation Stacks

Delete all stacks whose name and region matches the provided patterns and have been created before given datetime:

aws-toolbox cloudformation delete-stacks \
  --region "us-.*" \
  --name "aws-parallelcluster-3-8-0-amzn2.*"
  --before 2023-12-01T00:00:00.000Z

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

aws_toolbox-0.0.5.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

aws_toolbox-0.0.5-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file aws_toolbox-0.0.5.tar.gz.

File metadata

  • Download URL: aws_toolbox-0.0.5.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for aws_toolbox-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3af5b712bc3df512f16c7bfe3519cfd8a48897312b3ee5799cc51cead1afe31f
MD5 e8f96e2230c5ea78b8d13c7f062351f5
BLAKE2b-256 da2573ad6ba50e50c063eaf5e34e3a2727c4a6ffc173fcae1fc88a10c00e7d26

See more details on using hashes here.

File details

Details for the file aws_toolbox-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: aws_toolbox-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for aws_toolbox-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4cb0d41ad0b9ffe63444f10d2f78f8b64b0db3b708c044cbfe447fa1f066436c
MD5 a7e9cea1d5df43c9ca40f3abbe45ebfb
BLAKE2b-256 75f883f8c2befb0830e8d52f0582a0cad352c59df37f05ab1a44481d0c3a9907

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page