How to Deploy a Dockerised Application on AWS ECS With Terraform
Go from creating a simple Node app to having it containerized, load-balanced, and deployed
Published in
7 min readMar 18, 2020
In this post, I will guide you through the process of deploying a Node app on AWS ECS with Terraform.
Guide Overview
We will follow these steps:
- Create a simple Node app and run it locally.
- Dockerize the Node app.
- Create an image repository on AWS ECR and push the image.
- Create an AWS ECS cluster.
- Create an AWS ECS task.
- Create an AWS ECS service.
- Create a load balancer.
The technologies used in this guide are:
- Amazon ECS — a fully managed container orchestration service
- Amazon ECR — a fully-managed Docker container registry
- Terraform — an open-source infrastructure as code tool
Prerequisites
- An AWS account
- Node installed
- Docker installed and some experience using it
- Terraform installed