Back

CR-2025-05 · Deployed on AWS EC2

GRID-EAFIT: energy prediction models, containerized and on AWS

Scope
Backend, ML models, Docker setup, AWS deployment
Period
May 2025
Result
Energy prediction web app, containerized and deployed on AWS EC2
Status
Done
Evidence
Project

Summary

On GRID-EAFIT, a team academic project from May 2025, I built the models that predict electricity consumption and solar (photovoltaic) production, and then I got the project running on AWS EC2. My part of the team's work was the backend, the machine-learning models, the Docker setup and the AWS deployment.

The full name says what it was meant to be: energy prediction microservices with an MLOps architecture. In practice it's a web system split into services, a Flask backend and a separate React frontend. The frontend calls the backend's API from another origin, and browsers block that kind of request unless the server allows it. Flask-CORS is what lets the backend allow it.

I built the predictive models with Keras on TensorFlow, for both consumption and solar production, the two numbers the application exists to predict.

With two services on two different stacks, I used Docker to give each one a portable, isolated environment. There's a Dockerfile for the backend, another for the frontend, and Docker Compose brings the two up together, so one command starts the whole application.

Then I handled the deployment on AWS EC2, the last piece of my part. The project's deployment documentation lays out the architecture: routing to the right service, load balancing across instances, auto-scaling when the load changes. None of it runs on Kubernetes, which I've only used in coursework.

Since I built the models and also did the deployment, I saw both ends of the same project: the Keras code that makes the predictions, and the EC2 setup it has to run on.

How it was tested

The project has automated tests written with Pytest, and the EC2 deployment is documented. The repository is public, so anyone can open the Dockerfiles, the Compose file, the tests and the deployment notes and see how it fits together.

Timeline

May 2025Team academic project: a web app that predicts electricity consumption and solar production

  1. Implemented the Flask backend and built the Keras and TensorFlow models
  2. Designed the Docker setup: a Dockerfile per service, Docker Compose to run them together
  3. Deployed it on AWS EC2

Stack

Flask · React · Keras · TensorFlow · Docker Compose · Pytest · AWS EC2

Links

github.com/MauricioCa07/Comunidades_Energeticas_Predicciones

Next change review: Moving APOLO off VMware without turning anything off Next change review: ASC26 in Wuxi: my part was the infrastructure Next change review: Message middleware in C++, from replication to AWS load tests