I want to find resources that might no longer be needed and automate their cleanup, but require explicit approval before any deletion runs. What would you use for this?
How can I clean up unused AWS resources without deleting anything before approval?
Answers
Systems Manager Automation has an aws:approve step you can put in a runbook before the deletion steps. The run pauses for the designated approvers, and you can use an SNS topic to notify them.
I'd have the discovery process produce a proposed list first, with the resource IDs and reasons for flagging them. Then make sure the approved run is limited to those targets rather than deleting whatever a fresh scan happens to find.
Reply to this answer
Mark candidates for cleanup first and give owners time to object. During that period, watch for signs the resources are still being accessed. A quiet resource isn't necessarily an unused one, especially if it supports something occasional.
Where practical, make the first change reversible. Stop an EC2 instance instead of terminating it, and snapshot volumes or databases before removal. Stopped instances still incur charges for their EBS volumes, and stopped RDS databases can start again after seven days. Keep the final deletion behind your approval gate even if nobody responds.
Reply to this answer
AWS Config is a useful starting point for inventory and configuration checks. Use it to surface candidates, not as proof that they're safe to remove. You'll still need to check usage, dependencies, and ownership before presenting a deletion request.
Reply to this answer
Make the approval queue usable or it will become a chore. Route candidates to the owner in their tags where possible, include the estimated monthly cost, and consider a digest for lower-cost items rather than sending a separate request for each one.
Missing tags are a reason to investigate, not enough on their own to delete something. A reminder without a response also isn't the explicit approval you're asking for.
Reply to this answer
For the longer term, manage resources through infrastructure as code and require ownership tags where you can. That makes it easier to trace what a resource is for and who should review it, though it won't automatically settle whether an older resource is safe to delete.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions