Personal Blog

Build a Serverless CI/CD pipeline on AWS with Fargate, CodePipeline and Terraform

This blog provides an example for deploying a CI/CD pipeline on AWS utilising the serverless container platform Fargate and the fully managed CodePipeline service. We’ll also use Terraform to automate the process for building the entire AWS environment, as shown in the below diagram. Specifically, we’ll be creating the following AWS resources: 1x demo VPC including public/private subnets, NAT gateway and security groups etc 1x ALB for providing LB services to a target group of 2x Fargate container tasks 1x ECS cluster with a Fargate service definition (running our demo app) 1x CodePipeline definition, which builds the demo app from GitHub Repo (with a webhook trigger) and deploys it to the same Fargate service 1x ECR repository for hosting pipeline build images 2x S3 Buckets as build & artifact cache References – for this demo, I’m using these Terraform modules found on GitHub: ...

June 20, 2020 · 6 min · route179