15 - Containers on AWS ECS Fargate ECR EKS

Containers on AWS - Section Overview

awscontainersecsekssaa-c03

Section Map

This section covers Docker and the AWS services that run, store and migrate containers: ECS, Fargate, ECR, EKS, App Runner and App2Container. It builds on ALB, NLB, ASG and EFS.

# Topic Key Concepts
01 Docker Introduction Containers, Docker repositories, Docker vs VM, Dockerfile build/push/pull/run, container services on AWS
02 Amazon ECS EC2 vs Fargate launch type, EC2 Instance Profile vs ECS Task Role, ALB/NLB integration, EFS, hands-on cluster and service, clean up
03 ECS - Auto Scaling Application Auto Scaling, 3 metrics, target tracking/step/scheduled, ASG scaling vs Capacity Provider
04 ECS - Solutions Architectures EventBridge on S3 upload, EventBridge schedule, SQS queue, EventBridge task state change
05 Amazon ECR Private and public registry, S3 storage, IAM, vulnerability scanning
06 Amazon EKS Managed Kubernetes, pods, node types, storage classes, hands-on
07 AWS App Runner Source code or image to URL, auto scaling, VPC access, hands-on
08 AWS App2Container CLI, Java and .NET lift-and-shift to containers

Key Exam Topics

  • Docker - keyword microservice architecture; images stored in Docker Hub (public) or Amazon ECR
  • ECS EC2 launch type - you provision and maintain the EC2 instances; Fargate - serverless, the exam loves it
  • EC2 Instance Profile (used by the ECS Agent) vs ECS Task Role (per task, defined in the task definition)
  • ALB works for most ECS use cases; NLB for very high throughput or AWS PrivateLink; Classic LB not recommended and cannot link to Fargate
  • EFS = persistent multi-AZ shared storage for ECS tasks, works with EC2 and Fargate; EBS can also attach to a task (one per task)
AWS update (2024-01)

ECS and Fargate tasks can attach EBS volumes, one per task; EFS is no longer the only persistent option. AWS source

  • ECS Service Auto Scaling metrics: CPU, memory, ALB Request Count Per Target
  • EC2 launch type cluster scaling: prefer ECS Cluster Capacity Provider over ASG scaling
  • EventBridge triggers ECS tasks (S3 events, schedule) and reports task state changes
  • ECR - anytime you see storing Docker images, think ECR
  • EKS - managed Kubernetes, open source and cloud agnostic; pods; EFS is the only storage class that works with Fargate
  • App Runner - deploy web apps and APIs with no infrastructure knowledge (closed to new customers since 2026-04-30)
AWS update (2026-04)

App Runner is closed to new customers since 2026-04-30; AWS recommends ECS Express Mode. AWS source, release notes

  • App2Container - migrate Java or .NET web apps to Docker containers without code changes (closed to new customers since 2025-11-07)
AWS update (2025-11)

App2Container is closed to new customers since 2025-11-07; AWS points to AWS Transform. AWS source

Check yourself

Quiz