Skip to content

Python API deployed to AWS ECS with Github Actions. AWS Infrastructure managed with IaC Terraform.

Notifications You must be signed in to change notification settings

DamianFigiel/aws-ecs-terraform-python-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS ECS, AWS CodeDeploy, Terraform, Python API

Complete solution to deploy API build into Docker image to AWS infrastructure created and managed by Terraform.

How it works

  1. Developer makes changes to python-api, opens PR, PR get approved and merged.
  2. Once PR is merged, Github Action is triggered and new python-api image is pushed into AWS ECR repository.
  3. New image in AWS ECR repository triggers AWS CodePipeline, which automaticlly deploys new API version to AWS ECS by using Blue/Green deployment strategy.
  4. If automated health checks pass, release is successfull and old API version is removed.

How to use it

Prerequisites

----------------- CONTINUE HERE -----------------

Step by step

  1. Deploy infra
  2. Push pipeline files
  3. Push image

Create all needed AWS infrastructure with Terraform:


export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
  1. Run terraform init in order to connect with backend and download plugins (providers).

  2. Run terraform workspace new dev in order to create new workspace named dev.

  3. Run terraform plan -out=example.tfplan in order to see infrastructure changes that are going to be applied.

  4. Run terrafrom apply example.tfplan to apply changes.

  5. (optional) If you want to destory infrastructure, run terraform destory -auto-approve.

About

Python API deployed to AWS ECS with Github Actions. AWS Infrastructure managed with IaC Terraform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published