AWS Builder Center
I Deleted My EC2 Instance... So Why Is AWS Still Charging Me? 😱

I Deleted My EC2 Instance... So Why Is AWS Still Charging Me? 😱

You launched an EC2 instance, finished your lab, and deleted it. Problem solved, right? Not so fast! AWS resources can continue generating charges even after an instance is terminated. Let's explore the hidden costs that every cloud beginner should understand.

Soy Analista de Infraestructura TI, he trabajado con infraestructura OnPremise y Cloud.

I Deleted My EC2 Instance... So Why Is AWS Still Charging Me? 😱

I created an EC2 instance to practice AWS. I finished my lab, terminated the instance, and closed my browser.
Everything should be fine, right?
A few days later, I checked my AWS billing dashboard...
And there were still charges!
Wait... WHAT? 😂
This is one of those situations that can surprise anyone learning cloud computing, especially when starting with AWS.
The interesting part is that terminating an EC2 instance does not necessarily mean that every resource associated with it has been deleted.
Let's look at some common reasons.

1. Your EBS Volumes Might Still Exist

This is probably one of the first things I would investigate.
Amazon EBS provides persistent block storage for EC2 instances.
When an EC2 instance is terminated, the behavior of its attached EBS volumes depends on their configuration.
Some volumes are automatically deleted, while others can remain available.
If an EBS volume remains allocated, it can continue generating storage charges even when no EC2 instance is running.
Lesson: Always review your EBS volumes after terminating an instance.

2. EBS Snapshots Can Still Cost Money

Did you create a snapshot before deleting your instance?
Snapshots are useful for backup and recovery, but they are stored independently of the EC2 instance.
This means that terminating the original instance does not automatically remove its snapshots.
AWS charges for snapshot storage according to the applicable pricing model.
Lesson: Review your snapshots and retention policies. Keep the backups you need, but don't accumulate unnecessary ones.

3. Elastic IP Addresses

Elastic IP addresses are static public IPv4 addresses associated with your AWS account.
If you allocated an Elastic IP and no longer need it, simply terminating the EC2 instance does not necessarily release that address.
An allocated public IPv4 address can incur charges, including when it is not associated with a running resource.
Lesson: Release public IPv4 addresses that are no longer required.

4. NAT Gateway: The Cost You Might Not Expect

This one deserves special attention.
A NAT Gateway allows resources in private subnets to initiate outbound communication with external networks without requiring direct public IP addresses on those resources.
It is useful for production architectures.
However, NAT Gateway has hourly charges and data processing charges.
Imagine creating a VPC for a small laboratory, deploying a NAT Gateway, and then forgetting about it.
Even after terminating your EC2 instances, the NAT Gateway may continue generating costs.
Lesson: Check your networking resources, not just your virtual machines.

5. Load Balancers and Other Resources

There are other AWS services that can generate charges independently of EC2 instances.
For example:
  • Application Load Balancers
  • Network Load Balancers
  • Amazon RDS databases
  • Provisioned storage
  • Additional networking services
  • Data transfer
Deleting one resource does not automatically delete every other resource in your architecture.
This is why understanding resource dependencies is important.

My AWS Cost-Saving Checklist

Before finishing an AWS laboratory, I would review the following resources:
Resource
What should I check?
EC2
Terminate instances no longer needed
EBS
Review unattached volumes
Snapshots
Review unnecessary recovery points
Elastic IP
Release unused addresses
NAT Gateway
Delete if no longer required
Load Balancers
Remove unused load balancers
RDS
Stop or delete databases according to requirements
S3
Review unnecessary stored data
Remember that stopping an instance is not the same as terminating it, and some resources continue generating charges even when workloads are inactive.

How Can We Monitor AWS Costs?

AWS provides several tools that can help prevent unexpected expenses.
AWS Cost Explorer
Helps analyze spending patterns and identify where costs are coming from.
AWS Budgets
Allows you to configure budgets and receive notifications when actual or forecasted costs reach specified thresholds.
AWS Cost Anomaly Detection
Helps identify unusual spending patterns and notify you when unexpected cost anomalies are detected.
These tools are particularly useful when learning AWS because they encourage us to think about cost management from the beginning.

My Perspective

Coming from traditional data center infrastructure, I was used to thinking about physical servers, virtualization hosts, storage capacity, and network equipment.
In AWS, provisioning infrastructure is much faster.
You can create an EC2 instance, configure networking, attach storage, and deploy an application in minutes.
But that convenience comes with an important responsibility:
You must understand what you are provisioning and what you are paying for.
Cloud computing is not simply about creating resources whenever you need them.
It is also about managing their lifecycle.
A good cloud administrator should understand architecture, security, availability, and cost optimization.

Now I Have a Question for the AWS Community! 😂

Let's be honest...
Have you ever received an unexpected AWS bill?
I'd love to hear your experience.
  1. What AWS resource surprised you with unexpected charges?
  1. Was it EC2, EBS, NAT Gateway, Elastic IP, or something else?
  1. What advice would you give someone just starting with AWS?
And if you've never experienced this problem, congratulations! You're already one step ahead. 😅
Remember: In AWS, deleting your virtual machine doesn't always mean deleting your bill!
Let's share our experiences and help other builders avoid unnecessary cloud costs. 🚀
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article