Automated Cloud Expenditure Governance and Idle Instance Remediation on AWS EC2 Using Python Boto3 and CloudWatch Telemetry

Companies running applications in the public cloud often end up paying for far more computing power than they actually use. Because engineers can launch virtual servers in a couple of minutes, temporary test machines and oversized instances frequently stay powered on long after their work is done. Standard billing alerts do little to prevent this waste because they only notify managers after the monthly spending cap has already been crossed. To fix this gap, we built an automated cloud cost governance tool for Amazon Web Services (AWS) Elastic Compute Cloud (EC2) using Python and the Boto3 Software Development Kit (SDK). Running from a central Linux node without requiring background agents on target machines, the script pulls live CPU utilization, network traffic, and disk activity straight from AWS CloudWatch. It calculates rolling hourly utilization averages against a strict 5.0% CPU cutoff to separate genuinely abandoned "zombie" servers from intermittent batch jobs. When an instance stays below the 5.0% mark for a full hour, the system stops it automatically and sends an alert through Amazon Simple Notification Service (SNS). In tests across ten EC2 instances spanning web servers, cyclical batch processors, and idle nodes, the tool shut down every idle server while leaving active and bursty workloads untouched—saving an estimated $210.24 per month for every three idle m5. large instances.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-04
DOI
https://doi.org/10.5281/zenodo.23944021
Primary Topic
Cloud Computing and Resource Management
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automated Cloud Expenditure Governance and Idle Instance Remediation on AWS EC2 Using Python Boto3 and CloudWatch Telemetry

Mr. Lokesh K., Abdul Rahman., Darshan S., Dipak Singh., Hithashri T.
Zenodo (CERN European Organization for Nuclear Research)
Cloud Computing and Resource Management
article

Automated Cloud Expenditure Governance and Idle Instance Remediation on AWS EC2 Using Python Boto3 and CloudWatch Telemetry

Mr. Lokesh K., Abdul Rahman., Darshan S., Dipak Singh., Hithashri T.
article en

Abstract

Companies running applications in the public cloud often end up paying for far more computing power than they actually use. Because engineers can launch virtual servers in a couple of minutes, temporary test machines and oversized instances frequently stay powered on long after their work is done. Standard billing alerts do little to prevent this waste because they only notify managers after the monthly spending cap has already been crossed. To fix this gap, we built an automated cloud cost governance tool for Amazon Web Services (AWS) Elastic Compute Cloud (EC2) using Python and the Boto3 Software Development Kit (SDK). Running from a central Linux node without requiring background agents on target machines, the script pulls live CPU utilization, network traffic, and disk activity straight from AWS CloudWatch. It calculates rolling hourly utilization averages against a strict 5.0% CPU cutoff to separate genuinely abandoned "zombie" servers from intermittent batch jobs. When an instance stays below the 5.0% mark for a full hour, the system stops it automatically and sends an alert through Amazon Simple Notification Service (SNS). In tests across ten EC2 instances spanning web servers, cyclical batch processors, and idle nodes, the tool shut down every idle server while leaving active and bursty workloads untouched—saving an estimated $210.24 per month for every three idle m5. large instances.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 10%
Cloud Computing and Resource Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon