AWS never deletes anything for you. The load balancer from last year's proof of concept, the NAT gateway in a VPC nobody uses and the IAM role for a contractor who left are all still there. Each one costs money or gives an attacker a way in. Nobody removes them, because nobody is sure that nothing depends on them.
Two things fix this. Infrastructure as Code removes most of the leftovers for you, and traffic data tells you which of the remaining resources are safe to delete.
When you build everything with Infrastructure as Code, tools like Terraform track every resource they create. Cleaning up is then part of the tool, not a job someone has to remember:
terraform apply deletes itterraform destroy, or delete the CloudFormation stack, and a whole proof of concept is gone in one stepCode cannot tell you whether a resource you still declare is still used. For that, and for everything created by hand, you need the traffic and last-used data that AWS already collects.
Opt the whole organization in to these two services from the management account. Then register a member account as the delegated administrator for each, so the monthly review never needs a management account sign-in:
cost-optimization-hub:* to the exemption listTrusted Advisor has similar cost checks, but only on Business Support+ or a higher support plan.
Some resources are not covered, and some are worth a second look before you delete them. CloudWatch has the numbers.
| Resource | It is unused when |
|---|---|
| Application Load Balancer | RequestCount is zero for 30 days |
| RDS database | DatabaseConnections is zero for 30 days |
| Elastic IP address | It is not attached to anything. AWS charges for every public IPv4 address, attached or not |
| Anything with no owner tag | Nobody claims it after you ask |
Resources hide in Regions you never open. Resource Explorer searches every Region once you turn on cross-Region search, and every account once you set up multi-account search. A Region restriction SCP keeps the list of places to look short.
An unused role or key costs nothing, so it never shows up in a cost report. It is still a credential someone can steal.
Delete a role that nothing has used for 90 days, unless it exists for emergencies. Tag break-glass and deployment roles so the review skips them. If a role is used but most of its permissions are not, cut the permissions.
Northwind finds a load balancer called test-lb-2 on the bill. Nobody knows who created it, so nobody dares delete it. It stays on the bill for 2 years.
❌ Figure: Bad example - Bad example - With no owner and no usage data, the safe choice is to leave it running
test-lb-2 has an owner tag and zero requests for 30 days. The owner confirms the proof of concept is over, and a pull request removes it.
✅ Figure: Good example - Good example - The traffic shows it is unused, and the tag shows who can confirm it
Dev and test resources need the same care in any cloud. See Do you shut down dev and test resources when you no longer need them?