Skip to content

Terraform code with FastAPI service for backend and host it to AWS FARGATE and FARGATE SPOT

Notifications You must be signed in to change notification settings

Jacer7/fastapi-fargate

Repository files navigation

Custom badge Custom badge Custom badge Custom badge Custom badge

Introduction

  • Creatoin of FastAPI Service
  • Contanerize the application using Docker Client
  • Upload the Docker Image to Docker Hub
  • Create a Elastic Container Repository (ECR) with Terraform
  • Upload the Docker Inage to Elastic Container Repository (ECR) by cmd line
  • Create a Cluster with Terraform
  • Create Task defination in Cluster, assign resource type like CPU, Memory with Terraform
  • Create Service as Fargate and Fargate Spot
  • Create a Capacity provider strategy, if Fargate Spot is available use it primilarily and if failed then use Fargate with Terraform
  • Deploy ECR Image to ECS Cluster and run the task in the service we created earlier.
  • hence, the final Public IP will be the hosted service and ready to use it.

About

Terraform code with FastAPI service for backend and host it to AWS FARGATE and FARGATE SPOT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published