All examples for AWS Resource Cleanup Runbook

Comprehensive AWS Account Audit

Complete audit framework with prioritized resource checklist, ready-to-run discovery commands for 8+ resource types, and cost impact analysis.

Input

What you provide to the skill

I think we have unused AWS resources draining our budget but I’m not sure what to delete. Can you help me audit our account?

Output

What the skill generates for you

AWS Resource Cleanup Audit

I’ll help you conduct a comprehensive AWS resource audit to identify unused resources and estimate potential savings.

Step 1: Start with High-Impact, Low-Risk Resources

Let’s begin with the easiest wins - resources that are clearly unused and safe to delete:

1. Unattached EBS Volumes 🟒 SAFE

What to look for: Volumes with state β€œavailable” (not attached to any EC2 instance)

Discovery Command:

# Find all unattached EBS volumes
aws ec2 describe-volumes \
--filters Name=status,Values=available \
--query 'Volumes[*].{ID:VolumeId,Size:Size,Type:VolumeType,Created:CreateTime,AZ:AvailabilityZone}' \
--output table

Calculate potential savings:

# Get total unattached GB
aws ec2 describe-volumes \
--filters Name=status,Values=available \
--query 'sum(Volumes[*].Size)' \
--output text
# Multiply result by $0.10 for monthly gp3 cost or $0.125 for gp2

How to interpret: Each unattached volume costs ~$0.10/GB/month (gp3) or ~$0.125/GB/month (gp2). If you have 500GB unattached β†’ ~$50/month ($600/year)


2. Unused Elastic IPs 🟒 SAFE

What to look for: Elastic IPs not associated with any running instance

Discovery Command:

# Find Elastic IPs not associated with any instance
aws ec2 describe-addresses \
--query 'Addresses[?AssociationId==null].{IP:PublicIp,AllocationId:AllocationId}' \
--output table

Cost: Each unused Elastic IP costs $3.60/month ($43.20/year)


3. Old EBS Snapshots 🟑 CAUTION

What to look for: Snapshots older than 90 days that may no longer be needed

Discovery Command:

# Find snapshots older than 90 days
aws ec2 describe-snapshots \
--owner-ids self \
--query 'Snapshots[?StartTime<=`'$(date -u -d '90 days ago' +%Y-%m-%d)'`].{ID:SnapshotId,Size:VolumeSize,Created:StartTime,Description:Description}' \
--output table

Cost: $0.05/GB/month for snapshot storage


4. Stopped EC2 Instances 🟑 CAUTION

What to look for: Instances that have been stopped for extended periods

Discovery Command:

# Find stopped EC2 instances
aws ec2 describe-instances \
--filters Name=instance-state-name,Values=stopped \
--query 'Reservations[*].Instances[*].{ID:InstanceId,Type:InstanceType,Name:Tags[?Key==`Name`]|[0].Value,LaunchTime:LaunchTime}' \
--output table

Note: Stopped instances still incur EBS storage costs but not compute costs.


5. Idle Load Balancers 🟑 CAUTION

Discovery Command:

# List all Application Load Balancers
aws elbv2 describe-load-balancers \
--query 'LoadBalancers[*].{Name:LoadBalancerName,ARN:LoadBalancerArn,Created:CreatedTime,State:State.Code}' \
--output table

Cost: Each Application Load Balancer costs ~$16-25/month base + data processing fees


6. NAT Gateways 🟑 CAUTION

Discovery Command:

# Find all NAT Gateways
aws ec2 describe-nat-gateways \
--query 'NatGateways[?State==`available`].{ID:NatGatewayId,VPC:VpcId,Subnet:SubnetId,Created:CreateTime}' \
--output table

Cost: Each NAT Gateway costs ~$32-45/month + data processing fees


7. Unused RDS Instances πŸ”΄ DANGER

Discovery Command:

# List all RDS instances
aws rds describe-db-instances \
--query 'DBInstances[*].{ID:DBInstanceIdentifier,Engine:Engine,Size:DBInstanceClass,Status:DBInstanceStatus,Created:InstanceCreateTime}' \
--output table

Cost: RDS instances can range from $50-500+/month depending on instance type


8. Old AMIs and Associated Snapshots 🟒 SAFE

Discovery Command:

# Find your custom AMIs
aws ec2 describe-images \
--owners self \
--query 'Images[*].{ID:ImageId,Name:Name,Created:CreationDate,Size:BlockDeviceMappings[0].Ebs.VolumeSize}' \
--output table

Cost: ~$0.05/GB/month for snapshot storage backing the AMIs


Complete Audit Checklist

| Priority | Resource Type | Monthly Cost Impact | Discovery Difficulty |
|–––––|β€”β€”β€”β€”β€”|––––––––––|––––––––––||
| πŸ”΄ High | Unused EC2 Instances | $50-500/instance | Easy |
| πŸ”΄ High | Unattached EBS Volumes | $10-100/volume | Easy |
| πŸ”΄ High | Idle RDS Instances | $50-500/instance | Medium |
| 🟑 Medium | Unused Elastic IPs | $3.60/IP | Easy |
| 🟑 Medium | Old EBS Snapshots | $5-50/TB | Easy |
| 🟑 Medium | Idle Load Balancers | $16-25/month | Medium |
| 🟑 Medium | NAT Gateways | $32-45/month | Medium |
| 🟒 Low | Old Lambda Versions | $0-5 | Easy |
| 🟒 Low | Unused AMIs | $0.05/GB | Easy |
| 🟒 Low | CloudWatch Logs | Varies | Easy |


Next Steps

  1. Specify your AWS region(s): Which region should we audit?
  2. Run the discovery commands: Start with items 1-3 above
  3. Share the results: I’ll calculate exact potential savings and provide safe deletion commands
  4. Production check: Do you have any active production workloads we need to be careful around?

⚠️ Multi-Region Reminder: Check all regions where you’ve deployed resources:

aws ec2 describe-regions --query 'Regions[*].RegionName' --output text