Interview Prep/AWS/ECS, EKS, Lambda and ECR

Deploy a containerized API on ECS behind an ALB. What are the building blocks?

BeginnerScenarioECS, EKS, Lambda and ECR
Answer

Situation read → Task definition, service, target group, ALB.

What I'd do →

  1. Push the image to ECR
  2. Register the task definition with awsvpc network mode, CPU and memory, log driver awslogs, and task role
  3. Create a service with desired count 3 across subnets and attach it to the ALB target group (IP type)
  4. Configure health check path and deployment circuit breaker
  5. aws ecs update-service --cluster prod --service api --force-new-deployment

Why → The task role grants app permissions, the execution role lets ECS pull images and write logs.

Interview tip → Know task role versus execution role.

aws All AWS questions Roadmap: EKS, ECS & serverless on AWS

More on ECS, EKS, Lambda and ECR