https://github.com/sai-123-code/age-calculator-flask-docker_ecs
A simple web-based age calculator built with Flask, deployed using Docker and AWS ECS
https://github.com/sai-123-code/age-calculator-flask-docker_ecs
docker-image ecs-fargate flask-api mlops python
Last synced: about 2 months ago
JSON representation
A simple web-based age calculator built with Flask, deployed using Docker and AWS ECS
- Host: GitHub
- URL: https://github.com/sai-123-code/age-calculator-flask-docker_ecs
- Owner: sai-123-code
- Created: 2025-07-08T08:57:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-09T12:56:59.000Z (11 months ago)
- Last Synced: 2026-05-03T12:37:16.497Z (about 2 months ago)
- Topics: docker-image, ecs-fargate, flask-api, mlops, python
- Language: CSS
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Age-calculator-flask-docker-ECS
This repository contains a simple Flask web application that calculates the age based on a user's date of birth, deployed using Docker and AWS ECS with Fargate. The goal of this project is to understand how Docker works, how to create Docker images, how to containerize a Python Flask application, and how to deploy it on AWS.
## Project Overview
The application is an age calculator that:
Takes a user's name and date of birth as input.
Calculates the age in years and months based on the current date (July 08, 2025, 03:42 PM IST).
Displays the result on the same page with a styled interface using CSS.
## Technologies Used
- **Python 3.13**: For the Flask backend.
- **Flask**: A micro web framework for building the application.
- **HTML/CSS**: For the frontend interface.
- **Docker**: For containerizing the application.
- **AWS IAM**: For authenticating and managing access to AWS services.
- **AWS ECR**: For storing and managing Docker images.
- **AWS ECS with Fargate**: For deploying and running the containerized application.
- **AWS Security Groups**: For controlling network access to the ECS service.
## Build the Docker Image
docker build -t calculate_age .
## Run the Container
docker run -p 8080:5000 calculate_age
## For Pushing Docker image to AWS ECR
Refer to this offical AWS blog - https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html
## Screenshots of Docker image created

## Screenshots of Webpage running in docker container

## Screenshot of pushing Docker image to ECR using Amazon CLI

## Screenshot of creating ECS Cluster and related task definition with Fargate

## Screenshot of final webapp deployed in same public ip address
