Deploying a Flask and React Microservice to AWS ECS

Learn how to deploy microservices to Amazon ECS powered by Flask, React, and Docker.

Learning Objectives

By the end of this course, you will be able to:

  1. Explain what container orchestration is and why you may need to use an orchestration tool to manage deployments
  2. Discuss the pros and cons of using Elastic Container Service (ECS) over other orchestration tools like Kubernetes, Mesos, and Docker Swarm
  3. Set up an IAM user
  4. Create a production Dockerfile that uses multistage Docker builds
  5. Utilize Amazon Elastic Container Registry (ECR) image registry to store built images
  6. Configure CodeBuild to run when code is checked in to GitHub
  7. Run unit and integrations tests and check code for quality and formatting issues on CodeBuild
  8. Configure RDS for data persistence
  9. Configure an Application Load Balancer (ALB) along with ECS to run a set of microservices
  10. Send container logs to CloudWatch
  11. Update a running container via a zero-downtime deployment strategy to not disrupt the current users or your application
  12. Explain the types of scaling that are available to you within ECS
  13. Use AWS Fargate with ECS to deploy a microservice
  14. Spin up AWS infrastructure via Terraform

Tools and Technologies


  1. Python
  2. Flask
  3. Postgres
  4. pytest
  5. Flask-RESTX
  6. Flask-SQLAlchemy
  7. Flask-CORS
  8. Flask-Bcrypt
  9. PyJWT
  10. Gunicorn
  12. flake8
  13. Black
  14. isort
  15. Swagger/OpenAPI


  1. JavaScript
  2. Node
  3. React
  4. Formik
  5. Jest
  6. React Testing Library
  7. Axios
  8. React Router
  9. ESLint
  10. Prettier
  11. Formik
  12. Yup


  1. Create React App
  2. Docker
  3. Nginx
  4. HTTPie
  5. Terraform

AWS Services

  1. IAM
  2. Elastic Container Registry (ECR)
  3. CodeBuild
  4. CloudWatch
  5. Elastic Container Service (ECS)
  6. Elastic Load Balancing (ELB)
  7. RDS
  8. Fargate

aws flask react logo


This is not a beginner course. It's designed for the advanced-beginner -- someone with at least six months of web development experience. Before beginning, you should have some familiarity with the following topics. Refer to these resources for more info:

Topic Resource
Docker Get started with Docker
Docker Compose Get started with Docker Compose
AWS What is AWS?

It will also be helpful to have experience with Flask and React. Check out the Test-Driven Development with Python, Flask, and Docker and Authentication with Flask, React, and Docker courses for more.



  • Current version: 1.3.0
  • Last updated: November 25th, 2020
  • AuthorMichael Herman

Table of Contents

Join our mailing list to be notified about course updates and new tutorials.