| name | aws-cost-cleanup |
| description | Automated cleanup of unused AWS resources to reduce costs |
| type | skill |
| created | 2026-02-27T00:00:00.000Z |
| domain | cloud-infrastructure |
| category | aws |
| risk | safe |
| source | community |
| tags | ["skill","cloud-infrastructure","aws","cost","cleanup"] |
AWS Cost Cleanup
Automate the identification and removal of unused AWS resources to eliminate waste.
When to Use This Skill
Use this skill when you need to automatically clean up unused AWS resources to reduce costs and eliminate waste.
Automated Cleanup Targets
Storage
- Unattached EBS volumes
- Old EBS snapshots (>90 days)
- Incomplete multipart S3 uploads
- Old S3 versions in versioned buckets
Compute
- Stopped EC2 instances (>30 days)
- Unused AMIs and associated snapshots
- Unused Elastic IPs
Networking
- Unused Elastic Load Balancers
- Unused NAT Gateways
- Orphaned ENIs
Cleanup Scripts
Safe Cleanup (Dry-Run First)
#!/bin/bash
echo "Finding unattached EBS volumes..."
VOLUMES=$(aws ec2 describe-volumes \
--filters Name=status,Values=available \
--query 'Volumes[*].VolumeId' \
--output text)
for vol in $VOLUMES; do
echo "Would delete: $vol"
done
#!/bin/bash
CUTOFF_DATE=$(date -d '90 days ago' --iso-8601)
aws ec2 describe-snapshots --owner-ids self \
--query "Snapshots[?StartTime<='$CUTOFF_DATE'].[SnapshotId,StartTime,VolumeSize]" \
--output text | while read snap_id start_time size; do
echo "Snapshot: $snap_id (Created: , Size: GB)"