
Post-Diwali AWS Cleanup: 3 Forgotten Resources Every Student Builder Should Audit
A practical FinOps guide on using the AWS CLI to audit unassociated Elastic IPs, orphaned EBS volumes, and infinite CloudWatch logs left behind after hackathons and personal projects.
Introduction: The Cloud Cleanup We Often Forget
Every Diwali, we clean our homes, clear out the clutter, and light diyas to welcome a fresh start. Our cloud accounts could use the same kind of attention.
Between hackathons, college projects, late-night experiments, and generative AI prototypes, it’s easy to leave behind resources we no longer need:
- An EC2 instance from a weekend hackathon
- An Elastic IP reserved for a temporary backend
- An unattached EBS volume left behind after an instance is terminated
- A CloudWatch log group filled with months of development logs
- A forgotten NAT Gateway quietly adding to the bill
These resources take only minutes to create—but can keep running or incurring costs long after a project is over.
With the next AWS Community Builders and leadership cycles in mind, I’ve been thinking about what it means to be a responsible cloud builder: knowing what we deploy, understanding what we actually use, and cleaning up when a project is done.
In this guide, I’ll cover three AWS resource types worth auditing, share the AWS CLI commands you can use to find them, and outline practical FinOps habits to help prevent unnecessary cloud costs.
1. Unassociated Elastic IPs: The Forgotten Public IPv4 Address
One common misconception among developers new to AWS is that stopping an EC2 instance means all associated costs immediately drop to zero.
Unfortunately, that is not always true.
AWS charges for public IPv4 addresses, including allocated Elastic IP addresses, subject to applicable pricing allowances. An Elastic IP that is no longer associated with an active running resource continues generating hourly charges.
The Student Builder Scenario
Imagine launching an EC2 instance for a hackathon backend, allocating an Elastic IP to make the application accessible at a static address, and terminating the instance after the jury pitch is over.
If you terminate the instance without explicitly releasing the Elastic IP allocation, that address remains in your account—quietly accumulating charges every hour.
The AWS CLI Audit
Run the following command to identify Elastic IP addresses without an active association in your current AWS Region:
aws ec2 describe-addresses \ --query "Addresses[?AssociationId==null].[AllocationId,PublicIp]" \ --output tableIf you identify an address you no longer need, release it immediately:
aws ec2 release-address \ --allocation-id eipalloc-xxxxxxxxTakeaway: Stopping an EC2 instance and releasing an unused public IPv4 address are two separate operations. Never assume terminating compute automatically cleans up your IP allocations.
2. Orphaned EBS Volumes: Storage That Survives Your EC2 Instance
Terminating an EC2 instance does not necessarily mean every attached EBS volume gets deleted with it.
The
DeleteOnTermination attribute determines whether an attached EBS volume is deleted when its parent instance terminates. If that setting is disabled—or if secondary data volumes were attached manually—the volume can persist in the available state indefinitely.The Student Builder Scenario
During a hackathon sprint, you might launch multiple EC2 instances, attach additional 30 GB or 50 GB
gp3 volumes for dataset training or Docker images, and terminate the instances once the submission is turned in.A forgotten 50 GB EBS volume will continue consuming allocated block storage costs month after month, even though its original server has long been deleted.
The AWS CLI Audit
Query all detached, available EBS volumes in your current Region:
aws ec2 describe-volumes \ --filters Name=status,Values=available \ --query "Volumes[*].[VolumeId,Size,VolumeType,CreateTime]" \ --output tableReview the volume IDs, creation dates, sizes, and tags before deleting anything. If a volume is genuinely abandoned and confirmed unneeded:
aws ec2 delete-volume \ --volume-id vol-xxxxxxxxImportant Caution: Do not delete a volume simply because it is detached. It could contain database snapshots, configuration files, or critical code from a past project. If in doubt, create an EBS snapshot first before deleting the volume.
3. Forgotten CloudWatch Log Groups & Temporary S3 Objects
Not every forgotten AWS resource looks like a traditional running virtual server. Some of the most common silent cost drivers are logging groups and temporary storage objects created during application development.
A. CloudWatch Log Groups
When building serverless applications with AWS Lambda, CloudWatch Logs automatically creates a dedicated log group following the standard naming convention:
/aws/lambda/<function-name>By default, these log groups retain log events indefinitely (
Never Expire ). Over several months of rapid hackathons, test runs, and local debugging, dozens of log groups accumulate gigabytes of obsolete execution traces.The AWS CLI Audit:
List all log groups, their stored byte counts, and current retention policies:
aws logs describe-log-groups \ --query "logGroups[*].[logGroupName,storedBytes,retentionInDays]" \ --output tableFor development and hackathon workloads, enforce an explicit retention policy (such as 7 or 14 days):
aws logs put-retention-policy \ --log-group-name "/aws/lambda/my-hackathon-function" \ --retention-in-days 7B. Temporary S3 Objects
During prototyping sprints, we frequently create S3 buckets to test file uploads, document parsing pipelines, or model outputs. Temporary test objects and incomplete multipart uploads do not vanish on their own when the project wraps up.
The Solution: S3 Lifecycle Rules
Configure an S3 Lifecycle rule to expire objects in test buckets automatically after 14 or 30 days. For versioned buckets, ensure your rule also purges noncurrent versions and expired object delete markers.
4. The FinOps Guardrails: Preventing the Next Surprise Bill
Manual cleanups are necessary, but establishing automated architectural guardrails is far more effective. Here are four foundational FinOps practices every student builder should adopt:
1. AWS Budgets with Real-Time Alerts
Configure an AWS Budget with a conservative threshold (even a $1 or $5 limit for personal and student accounts). Configure both actual spend and forecasted spend notifications to your primary email address.
2. The Dreaded NAT Gateway Check
If your project required deploying a multi-tier VPC with public and private subnets, be vigilant about NAT Gateways. At roughly ~$0.045 per hour plus data processing fees, a forgotten NAT Gateway will consume over $32 per month while doing nothing. Verify active NAT Gateways across your active regions:
aws ec2 describe-nat-gateways \ --filter "Name=state,Values=available" \ --query "NatGateways[*].[NatGatewayId,VpcId,CreateTime]" \ --output table3. Systematic Resource Tagging
Tag your resources during creation:
Project: PhoenixHacksEnvironment: DevOwner: StudentBuilderAutoTeardown: TrueConsistent tags make it trivial to filter, audit, and clean up an entire project stack using the AWS Resource Groups Tag Editor.
4. A Post-Hackathon Teardown Checklist
Before considering any hackathon or semester build complete, execute this 6-point audit:
Resource Category | What to Audit & Verify |
|---|---|
Elastic IPs | Check for unassociated public IPv4 allocations ( AssociationId == null ). |
EBS Storage | Delete detached volumes; remove stale developmental snapshots. |
CloudWatch | Set 7-day retention limits on /aws/lambda/* log groups. |
S3 Buckets | Empty temporary staging buckets or apply 14-day lifecycle expiration. |
Compute & Networking | Terminate idle EC2 instances; delete unused NAT Gateways and ALBs. |
AWS Budgets | Verify active cost alerts and forecasted spending triggers. |
5. What I Learned: Cloud Architecture Starts Before Deployment
One key lesson I have learned while building projects on AWS is that deploying code is only half of cloud engineering.
Understanding the operational lifecycle matters just as much.
When we build in high-pressure hackathon sprints, our primary focus is velocity: getting the API working, hitting sub-second response times, and delivering a winning demo to the jury. Cost governance and resource teardown often become afterthoughts.
But responsible cloud development means thinking beyond the pitch:
- It means knowing what happens to your infrastructure when the demo concludes.
- It means treating cloud resources with the same operational care as production environments.
- It means preventing unnecessary waste so your credits and budget support your next big idea.
This Diwali season, while cleaning our physical spaces and lighting lamps, it is worth taking twenty minutes to open the AWS CLI and give our cloud accounts the exact same care.
Let's Hear from the AWS Community
To all builders, student developers, and cloud architects:
- What is the most unexpected AWS resource you have ever discovered silently running in your account after a project?
- Do you have a favorite AWS CLI one-liner, Bash script, or automation tool for auditing orphaned resources?
Share your stories and lessons in the comments below—your tip might save a fellow student builder from an unexpected cloud bill!
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article