Question

Difficulty: EasyModernizing Workloads using Containers (ECS and EKS)

A company is modernizing its legacy on-premises web application by migrating the workload to Amazon Elastic Container Service (Amazon ECS) using the AWS Fargate launch type. The modernized architecture requires that containerized tasks run securely in private subnets and pull container images from Amazon Elastic Container Registry (Amazon ECR) without traversing the public internet.

Which TWO configurations should the solutions architect implement to satisfy these requirements?

  1. Configure the ECS task definitions to use the awsvpc network mode.Answer
  2. Create VPC endpoints for Amazon ECR to enable private image pull operations.Answer
  3. C
    Configure the ECS task definitions to use the bridge network mode to optimize container-to-container port mapping.
  4. D
    Deploy a single NAT Gateway in a public subnet to route all ECR traffic securely over the public internet.

Answer

Configure the ECS task definitions to use the awsvpc network mode and create VPC endpoints for Amazon ECR to enable private image pull operations.
The correct configurations are to use the awsvpc network mode, which is the only supported network mode for tasks running on AWS Fargate, and to create VPC endpoints for Amazon ECR, which ensures that all image pulling traffic stays within the AWS network and does not traverse the public internet.

Step-by-Step Solution

1
Determine the required ECS launch type network requirements.
Identify that AWS Fargate only supports the awsvpc network mode.
This is a fundamental requirement of the Fargate launch type, which automatically provisions ENIs for tasks.
2
Evaluate the requirement for private image deployment from Amazon ECR.
Implement VPC endpoints for Amazon ECR (api and dkr endpoints).
This establishes private connections between the VPC and Amazon ECR using AWS PrivateLink, avoiding transit over the public internet.

Key Concept

AWS Fargate networking constraints and private access to AWS services via VPC endpoints
Rate this question