
I Deleted My EC2 Instance. Why Is AWS Still Charging Me?
You terminate an EC2 instance, close your AWS lab, and expect your costs to stop. But what if your AWS bill keeps increasing? In this article, I explore the hidden resources that can continue generating charges after an EC2 instance is deleted, including EBS volumes, snapshots, NAT Gateways, and public IPv4 addresses. Discover a practical cleanup checklist and learn how to avoid unexpected cloud costs.
I Deleted My EC2 Instance. Why Is AWS Still Charging Me?
Imagine spending an afternoon learning AWS.
You launch an EC2 instance, configure your environment, test your application, and finally terminate the instance when you finish.
You think everything is cleaned up.
Then you check your AWS billing dashboard.
There are still charges.
What happened?
This is a situation that can surprise beginners who are experimenting with AWS for the first time.
The important lesson is that deleting an EC2 instance does not automatically mean deleting every resource associated with it.
Let's understand why.
1. EC2 Is Only One Part of Your Infrastructure
When we launch an EC2 instance, we may also create or use other AWS resources.
For example:
- An EBS volume to store data.
- An Elastic IP address for network access.
- A NAT Gateway to provide outbound internet connectivity.
- Snapshots to preserve storage data.
- A Load Balancer to distribute traffic.
These resources have their own lifecycle and pricing.
Terminating the EC2 instance does not necessarily terminate all of them.
This is where unexpected costs can begin.
2. The First Hidden Cost: EBS Volumes
Amazon Elastic Block Store (EBS) provides persistent block storage for EC2 instances.
Here is something important to understand:
An EBS volume can exist independently of the EC2 instance.
Depending on its
DeleteOnTermination setting, a volume may remain after its instance is terminated.For example:
- You launch an EC2 instance.
- You attach an additional EBS volume.
- You store application data on it.
- You terminate the EC2 instance.
- The EBS volume remains available.
Even though the instance is gone, the retained volume can continue generating storage charges.
What should you check?
Open the EC2 console, select Volumes, and look for volumes that are no longer needed.
Before deleting anything, verify that the volume does not contain data you want to preserve.
3. The Second Hidden Cost: Snapshots
Snapshots are another resource worth checking.
Amazon EBS snapshots allow you to preserve volume data for backup and recovery.
They are useful, but they are not automatically free.
Imagine creating several snapshots while experimenting with different configurations.
Even after terminating the EC2 instance and deleting its volume, those snapshots may remain.
The lesson is simple:
Deleting the original instance does not mean your backups have disappeared.
Review your snapshots and keep only the ones you actually need.
Never delete a backup simply because you want to reduce costs without first checking whether it is still required.
4. The Third Hidden Cost: NAT Gateways
A NAT Gateway allows resources in private subnets to initiate connections to external networks without accepting unsolicited inbound connections from the internet.
It is useful in many architectures, but it can create ongoing costs.
For example:
- You create a VPC.
- You create public and private subnets.
- You deploy a NAT Gateway.
- You use it to provide internet access to private resources.
- You terminate your EC2 instance.
The NAT Gateway does not automatically disappear just because the EC2 instance is terminated.
Depending on its configuration and usage, it can continue generating hourly and data-processing charges.
For a small learning lab, leaving an unnecessary NAT Gateway running can be an expensive mistake.
5. The Fourth Hidden Cost: Public IPv4 Addresses
Public IPv4 addresses are also worth monitoring.
AWS charges for public IPv4 address usage under its current pricing model.
This means that networking resources can contribute to your bill even when your main compute instance is no longer running.
Review your allocated Elastic IP addresses and other public IPv4 resources.
Release addresses that are no longer required, after checking that they are not associated with an active service.
6. How I Would Investigate Unexpected AWS Charges
If I noticed that my AWS bill was still increasing after terminating an EC2 instance, I would follow this sequence.
Step 1 — Open AWS Billing
Start with the Billing and Cost Management dashboard.
Check the current estimated charges and identify which AWS services are generating costs.
Step 2 — Open AWS Cost Explorer
Use Cost Explorer to group costs by service.
Pay attention to categories such as:
- EC2 - Instances
- EC2 - Other
- VPC
- Elastic Load Balancing
- Amazon S3
This can help distinguish compute costs from associated infrastructure costs.
Step 3 — Inspect EC2 storage
Open the EC2 console and review:
- EBS Volumes
- Snapshots
- Volumes that are no longer attached to instances
Check whether any of these resources are still needed.
Step 4 — Inspect networking resources
Review:
- NAT Gateways
- Elastic IP addresses
- Public IPv4 addresses
- Load Balancers
Do not assume that these resources were removed when the instance was terminated.
Step 5 — Check other services
Depending on your lab, you may also have created RDS databases, S3 storage, CloudWatch resources, or other managed services.
Review the resources you actually deployed.
Step 6 — Remove unnecessary resources
Delete only resources that you have identified as unnecessary.
Be especially careful with databases, backups, and storage volumes because deleting them can result in permanent data loss.
Step 7 — Monitor the next billing update
AWS billing and Cost Explorer data are not necessarily updated instantly.
After cleanup, check the billing dashboard again as the cost data refreshes.
7. My AWS Lab Cleanup Checklist
Before finishing an AWS lab, I would use this checklist:
- Terminate EC2 instances that are no longer needed.
- Review unattached EBS volumes.
- Review old EBS snapshots.
- Delete unnecessary NAT Gateways.
- Release unused Elastic IP addresses.
- Remove unused Load Balancers.
- Check databases and other managed services.
- Review S3 storage and other retained resources.
- Check AWS Billing and Cost Explorer.
- Configure appropriate AWS Budgets alerts.
This small routine can help prevent unnecessary expenses.
8. A Better Habit: Think About Cost Before Deploying
One of the most useful habits I want to develop as an AWS learner is to think about the lifecycle of resources before creating them.
Before deploying a service, I should ask:
- What will this resource cost?
- Does it generate hourly charges?
- Does it retain data after deletion of another resource?
- How will I monitor its usage?
- How will I clean it up when my experiment is finished?
Cloud computing makes infrastructure easier to provision, but it also makes it easy to forget what is still running.
Conclusion
AWS costs do not always stop when an EC2 instance is terminated.
EBS volumes, snapshots, NAT Gateways, public IPv4 addresses, and other services can continue generating charges independently.
The most important lesson is to understand that cloud resources have separate lifecycles.
Don't just terminate your instance. Audit your entire infrastructure.
A good cloud engineer does not only know how to deploy resources. They also know how to monitor, secure, and clean them up.
Let's discuss
Have you ever terminated an EC2 instance and later discovered that another AWS resource was still generating charges?
Which resource surprised you the most?
Share your experience. It could help another AWS learner avoid the same mistake.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article