Menu

1 / 5

Deploy a Containerized Web App on AWS with ECR, ECS Fargate and an Application Load Balancer

DEV Community: docker·Nii Yartey Gidiglo·3 days ago
#LqvxTqbP
#devtodocker#devto#dev#name#task
Long article (2029 words) — no AI summary yet.
Reading 0:00
15s threshold

Containers solve the "works on my machine" problem, but you still need somewhere to run them. Amazon ECS on AWS Fargate runs containers without any servers to patch or scale: you describe the container, and AWS finds the capacity.

In this post I'm taking a small web app from source code to a production-style deployment: the image goes into Amazon ECR , runs as two Fargate tasks behind an Application Load Balancer , and then gets updated to version 2 with a rolling deployment . I measured that rollout from the outside, and not a single request failed.

What I'm building

Browser / curl │ HTTP :80 ▼ Application Load Balancer ── health checks /health │ only the ALB can reach port 8080 ▼ ECS Service (Fargate, ARM64) ├── Task 1 ── container "web" :8080 └── Task 2 ── container "web" :8080 │ ├──▶ image pulled from Amazon ECR └──▶ logs to CloudWatch Logs

Enter fullscreen mode

Exit fullscreen mode

Prerequisites: an AWS account, the AWS CLI v2 configured, and Docker.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.