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.6.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_toolbox-0.0.6-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws_toolbox-0.0.6.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for aws_toolbox-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1a78fbb36db9a479956a02688703814de9c2ee74b02adb315404aecff9494911
MD5 15aea022d8bfdf5fcd0f9a00fbc19d41
BLAKE2b-256 a2b011be2f6457bdc410002695fe7a16905412dab41bc3899ed02322b82a3e31

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aws_toolbox-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for aws_toolbox-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd7bad5329179cd1b97fe2739f5b86591d777d4f9c4dce1593966362a3ac2df
MD5 5560a1ebbe7e9822d01b86629f37b164
BLAKE2b-256 313297a5b9d12ffc5ccee89b966df98229af48a543daf746cc5b34dc2f4fe6bc

See more details on using hashes here.

Supported by

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