Container Orchestration

AWS Services

  • Amazon Elastic Container Service (ECS)
  • Amazon Elastic Container Registry (ECR)

Summary

You are required to deploy a containerized application using Amazon ECS. The task involves creating an ECR repository and configuring it as a pull-through cache for Docker Hub to pull the traefik/whoami image. You will then deploy this container as a service in ECS using the Fargate launch type, ensuring the service is correctly associated with a load balancer.

Task

You’ve been asked to deploy a simple containerized service on AWS. The service should use Amazon ECS and pull its image through a configured ECR repository.

  • Create an ECR repository named skills53-whoami and configure it as a pull-through cache for Docker Hub to fetch the traefik/whoami image.
  • Deploy the container as a service in ECS with the following requirements:
    • Use Fargate as the launch type.
    • Set the desired task count to 2.
    • Ensure the service is associated with a load balancer for HTTP traffic.
  • Configure the load balancer to correctly route traffic to the running tasks.

Verification:

  • Confirm the service is accessible via the load balancer’s DNS name.
  • Verify that traffic is correctly routed to both tasks, and the traefik/whoami image outputs the expected container information.

Hints:

  • Use the AWS documentation to learn how to configure an ECR pull-through cache.
  • Ensure the ECS service is deployed in at least two subnets across different Availability Zones.
  • Use the ECS console or CLI to monitor the service’s health and ensure tasks are running without issues.
Last updated on