El problema
El gasto cloud casi nunca se dispara de un día para otro. Se desvía poco a poco: un entorno de pruebas encendido todo el fin de semana, un servicio que se escala y nunca se vuelve a bajar. Cuando llega la factura, el dinero ya se ha gastado.
Quería una vista que respondiera rápido a tres preguntas: cuánto gastamos y dónde, si esta semana es distinta de la anterior y si hay algo claramente fuera de lugar.
Qué he hecho
- Una vista única del gasto diario en AWS y Azure, con filtros por proveedor, entorno y departamento.
- Un KPI semanal: los últimos 7 días frente a los 7 anteriores.
- Una alerta de anomalía con causa probable y acción sugerida, como el apagado automático de instancias de desarrollo ociosas.
Cómo está hecho
Python, pandas, Plotly y Streamlit. data_generator.py crea 90 días de facturación ficticia para 10 servicios, 4 departamentos y 3 entornos, e inyecta un pico en EC2 / Development la última semana para que la detección tenga algo que encontrar.
Siguientes pasos
- Importar las exportaciones CSV de AWS Cost Explorer y Azure Cost Management en lugar de los datos ficticios.
- Añadir una línea base estadística por servicio, para comparar cada servicio con su propio histórico.
- Fijar umbrales de presupuesto por departamento.
¿Quieres llevarlo a tu entorno o adaptarlo a tu caso? Escríbeme y lo vemos.
The problem
Cloud costs rarely explode overnight. They drift: a test environment left running over a weekend, a service scaled up and never scaled down. By the time the monthly invoice arrives, the money is already spent.
I wanted a view that answers three questions fast: how much are we spending and where, is this week different from last week, and is anything clearly out of line.
What I built
- A consolidated view of daily spend across AWS and Azure, with filters by provider, environment and department.
- A weekly KPI: the last 7 days against the previous 7.
- An anomaly alert with a probable cause and a suggested action, such as auto-shutdown for idle development instances.
How it is built
Python, pandas, Plotly and Streamlit. data_generator.py creates 90 days of synthetic billing for 10 services, 4 departments and 3 environments, and injects a spike into EC2 / Development in the last week so the detection has something to find.
Next steps
- Import the CSV exports from AWS Cost Explorer and Azure Cost Management instead of the synthetic data.
- Add a statistical baseline per service, so each service is compared with its own history.
- Set budget thresholds per department.
Want to bring it to your environment or adapt it to your case? Get in touch and we can look at it together.
Tech Career Lab · newsletter
¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.
Apúntate y llévate las 33 ideasSign up and get the 33 ideas →