How to stop all AWS charges: delete what's left, or close the account
Updated · 5 min read
You finished the tutorial, deleted the server, and the bill still came. AWS charges for things that exist, not only for things you use, and they're spread across regions and separate consoles, so one is easy to miss. There are two ways out: find and delete what's left, or close the account.
1. Find what you're still paying for
Open Billing and Cost Management → Bills and pick this month. Every charge is listed by service, and inside each service by region. That's your to-do list: anything with a charge on it still exists somewhere. Note each service and region, then go and look in that region.
The usual leftovers:
- EC2 servers, and the disks (EBS volumes) and snapshots they leave behind. A server's boot disk is deleted with it by default, but extra disks often aren't.
- NAT gateways and Elastic IPs, which charge by the hour even when nothing uses them. How to find out what's costing money has the commands and prices.
- Load balancers, which also charge by the hour.
- RDS databases and their manual snapshots. A stopped database starts itself again after seven days (here's how to keep one stopped).
- S3 buckets with files in them.
- Route 53: each hosted zone is $0.50 a month, and domains registered through Route 53 renew every year while auto-renew is on.
- KMS keys you created: $1 a month each until you schedule them for deletion.
- Lightsail, which has its own console. Its servers don't show up in EC2.
- AWS Marketplace subscriptions, which you cancel on Marketplace's Manage subscriptions page.
- Reserved Instances and Savings Plans are commitments: they bill until their term ends, whatever you delete.
2. Delete it
Most of these live in one region, so switch to the region the bill named before you look. A few things make deleting go smoothly:
- Delete whatever keeps recreating things first. If a server comes back after you terminate it, an Auto Scaling group (perhaps from Elastic Beanstalk) is replacing it: delete that, or set its desired capacity to 0. If a tutorial or a tool like SAM or CDK created your resources, deleting its stack in CloudFormation → Stacks removes everything it made in one go.
- Terminate servers you don't need; don't just stop them. A stopped server still pays for its disks and any Elastic IP attached to it.
- Empty buckets in the console. In S3 → General purpose buckets, select the bucket, choose Empty, type the bucket's name, and then Delete it. Emptying in the console removes every old version too.
The same with the AWS CLI. Add --region to each:
aws ec2 terminate-instances --region us-east-1 --instance-ids i-0123456789abcdef0
aws ec2 delete-volume --region us-east-1 --volume-id vol-0123456789abcdef0
aws ec2 delete-snapshot --region us-east-1 --snapshot-id snap-0123456789abcdef0
aws ec2 release-address --region us-east-1 --allocation-id eipalloc-0123456789abcdef0
aws ec2 delete-nat-gateway --region us-east-1 --nat-gateway-id nat-0123456789abcdef0
aws rds delete-db-instance --region us-east-1 --db-instance-identifier my-db --skip-final-snapshot
aws s3 rb s3://my-bucket --forceTwo of these deserve care. --skip-final-snapshot throws the database's data away; use --final-db-snapshot-identifier my-db-final instead if you might want it back (that snapshot is then billed as storage). And aws s3 rb --force deletes the files and then the bucket, but not old versions in a bucket with versioning on, so the delete fails there; use the console's Empty for those.
Not sure where else to look? This guide loops over every region with one command, and this one lists every running EC2 server.
Or close the account
If you're done with AWS altogether, closing the account is simpler than hunting.
- Sign in as the root user: the email address and password the account was created with. IAM users and roles can't close an account.
- Open the account menu at the top right, choose Account, and click Close account.
- Type the account ID to confirm, and click Close account. A confirmation email follows within a few minutes.
What to know first:
- You don't have to delete anything beforehand, but back up what you want to keep. For 90 days you can reopen the account (and charges for whatever is still in it restart). After that it's closed for good and AWS deletes what's left.
- One more bill comes the following month, for usage up to the day you closed it. Reserved Instances and Savings Plans keep billing until they expire, and Marketplace subscriptions aren't cancelled for you.
- Check the root email address. If it's at a domain registered with Route 53 in this same account, move the domain or change the email first. Closing suspends the domain, and with it the email you'd need to get back in.
- The email address can't be reused as the root email of another AWS account.
- In an AWS Organization, close member accounts from the management account's AWS Organizations console.
Charges can show up a day or so after the usage, so look at Bills again in a few days. A zero spend budget will email you if anything is still costing money.
Or in Cloud GUI
Cloud GUI's Costs page shows this month so far, AWS's forecast for the month and last month, with what each service costs, so you can watch a service's figure stop growing after you delete things. The free checkup looks in every region for disks not attached to any server, Elastic IPs not in use and stopped databases still paying for storage, and names each one. The Servers, Files, Functions and Databases pages each list what you have in every region in one place, which is the quickest way to spot the server in a region you never open. Cloud GUI is read-only apart from a few Pro actions (stopping servers, deleting files), so the deleting itself happens in AWS.