AWS Builder Center
The Silent Cloud Bill: Why Terminating an EC2 Instance Doesn't Always Stop Storage Costs

The Silent Cloud Bill: Why Terminating an EC2 Instance Doesn't Always Stop Storage Costs

The Silent Cloud Bill — Forgotten EBS Volumes That Keep Charging You

ENTC Student | Data & ML | AWS Explorer ☁️ | Building real-world tech solutions 🚀
Imagine this:
You launch an EC2 instance for testing a project. You finish your work, terminate the instance, and assume everything related to it is gone.
But a few days later, your AWS bill still includes storage charges.
What happened?
One possible reason is an orphaned Amazon EBS volume.

What is the actual problem?

Amazon EBS (Elastic Block Store) provides persistent storage for EC2 instances.
However, terminating an EC2 instance does not always delete its attached EBS volumes.
It depends on a setting called  DeleteOnTermination .
When this setting is false, the EBS volume can remain even after the EC2 instance is terminated. The volume enters an  available  state, meaning it is no longer attached to an instance, but it can still generate storage charges.
This creates a small but easily overlooked cloud cost problem.
Think about a company with 50 developers. Each developer creates temporary EC2 instances for testing. If nobody tracks the storage resources left behind, unnecessary costs can accumulate over time.

A simple real-world solution

Instead of manually checking every EC2 instance, we can create a simple monitoring process.
Step 1: Identify unattached EBS volumes
Using AWS CLI, run:
aws ec2 describe-volumes \
--filters Name=status,Values=available \
--query "Volumes[*].[VolumeId,Size,VolumeType,CreateTime]" \
--output table
This command lists EBS volumes that are currently not attached to EC2 instances.
Step 2: Identify who owns the volume
Use resource tags such as:
  • Owner
  • Project
  • Environment
  • CreatedDate
  • ExpiryDate
These tags help teams identify whether a volume is still required.
Step 3: Introduce a review process
Before deleting anything:
  1. Identify the volume owner.
  1. Check whether the data is still required.
  1. Take a snapshot if necessary.
  1. Notify the responsible team.
  1. Delete only after receiving approval.
Never automatically delete every volume in the  available  state. Some may contain important business data.

Can we automate this?

Yes!
We can build a small AWS-based monitoring workflow:
  • Amazon EventBridge: Schedule a daily check.
  • AWS Lambda: Run a script to identify unattached EBS volumes.
  • Amazon SNS: Send notifications to the responsible team.
  • Amazon DynamoDB (optional): Maintain a record of flagged volumes and review status.
The important idea is to automate detection and notification, not blindly automate deletion.

Why does this small problem matter?

Cloud optimization isn't always about choosing expensive or complicated services.
Sometimes, it is about identifying resources that nobody remembers creating.
A forgotten storage volume might seem insignificant, but hundreds of forgotten resources across different projects can create unnecessary expenses.
More importantly, a proper review process improves resource visibility, accountability, and cloud hygiene.

My takeaway

I believe cloud cost optimization should begin with a simple question:
Are we paying for something that nobody is using anymore?
A small monitoring system can help teams avoid unnecessary expenses while protecting important data.
Sometimes, the biggest cloud savings come from fixing the smallest overlooked problems.

Let's discuss!

Have you ever discovered an AWS resource that continued generating charges even after its associated service was terminated?
What other small cloud problems do you think deserve more attention?
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