AWS Automations - Multi-Service Cleanup
Portfolio-ready AWS cleanup tool with safe defaults, dry-run first, and a live CLI view.
Highlights
- Multi-service cleanup for S3, EC2, Lambda, EBS, CloudWatch, and IAM
- Dry-run by default;
--applyrequired for deletions - Filters: prefixes, target/ignore lists, optional tag requirement
- Age gates for buckets/objects; supports versioned buckets
- Live Rich table (opt-out with
--no-live) plus JSON output when needed - Safety switches to guard zero retention and delete-all modes
- Interactive per-bucket approval and batched deletes
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[dev]"
Runtime-only (no dev tools):
pip install -e .
Configure
Copy config.example.yaml to config.yaml and adjust:
bucket_prefixes,target_buckets,ignore_bucketsbucket_retention_days,object_retention_days,delete_all_objectsinclude_versioned_objects,delete_empty_buckets- Optional
require_tag: { key, value }
Run (S3 direct)
Dry-run (default):
python -m aws_automations.s3_cleanup --config config.yaml
Plan view (no apply) with live table on TTY:
python -m aws_automations.s3_cleanup --config config.yaml --plan --live
Apply deletions for specific buckets:
python -m aws_automations.s3_cleanup --config config.yaml --apply \
--bucket sandbox-a --bucket sandbox-b
Interactive approval per bucket:
python -m aws_automations.s3_cleanup --config config.yaml --apply --interactive
JSON summary (suppresses live UI):
python -m aws_automations.s3_cleanup --config config.yaml --plan --json
One-off include/exclude without editing config:
python -m aws_automations.s3_cleanup --config config.yaml --include temp-bucket --exclude ignore-me
Toggle live rendering:
python -m aws_automations.s3_cleanup --config config.yaml --no-live
Run (Interactive Menu)
Start the interactive menu for guided cleanup:
aws-menu
Or run directly:
python -m aws_automations.start
Run (multi-service orchestrator)
Clean up one or all services with a live table (default on TTY):
aws-cleanup --config config.yaml --service all --live
Or run via module:
python -m aws_automations.main --config config.yaml --service all --live
Focus on a single service (e.g., EC2) in dry-run:
python -m aws_automations.main --config config.yaml --service ec2
Emit JSON summary (suppresses live UI):
python -m aws_automations.main --config config.yaml --service lambda --json
Safety switches:
--force-zero-retentionrequired with--applywhenobject_retention_days <= 0--force-delete-allrequired with--applywhendelete_all_objects: true
Add --verbose for debug logs.
Tests
python -m pytest
Smoke Test
Quick verification that install and CLI wiring are healthy:
python3 -m pip install --upgrade aws-automations
aws-cleanup --help
aws-menu --help
python3 -c "from importlib.metadata import version; print(version('aws-automations'))"
Security Checks
- CI runs Bandit static security analysis on
aws_automations(Python 3.11 job). - Failing threshold is set to medium-or-higher severity/confidence.
bandit -r aws_automations --severity-level medium --confidence-level medium
Changelog
See CHANGELOG.md for versioned release notes.
Notes
- Uses paginated, batched deletes (S3 limits batches to 1,000 objects).
- Live UI is disabled automatically for JSON output or when stdout is not a TTY.
- Keep AWS credentials scoped to the buckets you intend to manage.
Metadata
Release files for aws-automations 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws_automations-0.1.2.tar.gz | 22.0 kB | Without provenance | Details for aws_automations-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_automations-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for aws_automations-0.1.2-py3-none-any.whl |
Total release size: 48.5 kB
Release files / aws_automations-0.1.2.tar.gz
| Download URL | aws_automations-0.1.2.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b4f9faff87640c0179e20e660eda33a3f99db7ff598fabdba2bc48f818e6a29
|
|
BLAKE2b-256 checksum How to use checksums |
b1adf6fe96207aa3c2c9086a2bb2e2fca174e6ab5f0181a6e429443599ee0f85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / aws_automations-0.1.2-py3-none-any.whl
| Download URL | aws_automations-0.1.2-py3-none-any.whl |
|---|---|
| Size | 26.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5723dc0ffe2bea00764e18bb930f42b7b8f3caf4c9dc0af78c505d35f615e71
|
|
BLAKE2b-256 checksum How to use checksums |
ae32773e7c16f13428ba549b65ef377e4c43fa61f6e33935a218a30bc5147e7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for aws-automations 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.