A logistics company, SwiftRoute, is modernizing its on-premises package tracking application by migrating it to Amazon ECS on AWS Fargate. The tasks must be deployed in private subnets, pull container images from Amazon ECR, and write tracking data to Amazon DynamoDB. The company's security policy strictly prohibits the use of NAT Gateways or Internet Gateways. Additionally, the solutions architect must minimize costs and operational overhead. Which configuration should the solutions architect recommend to meet these requirements?
- Configure interface VPC endpoints for Amazon ECR and Amazon ECS. Configure gateway VPC endpoints for Amazon S3 and Amazon DynamoDB, and associate them with the private subnets' route tables. Run the tasks on AWS Fargate using the awsvpc network mode.Answer
- BConfigure interface VPC endpoints for Amazon ECR, Amazon ECS, and Amazon S3. Configure the ECS task definition to use bridge networking to allow the container instances to share the host's network namespace for DynamoDB traffic.
- CConfigure a single NAT Gateway in a public subnet, and update the route table of the private subnets to route all outbound traffic through the NAT Gateway to access Amazon ECR and Amazon DynamoDB.
- DConfigure interface VPC endpoints for Amazon ECR and Amazon ECS. Create a Route 53 Private Hosted Zone for Amazon DynamoDB and Amazon S3, and associate it with the VPC to resolve public endpoints to private IP addresses.
Answer
Configure interface VPC endpoints for Amazon ECR and Amazon ECS. Configure gateway VPC endpoints for Amazon S3 and Amazon DynamoDB, and associate them with the private subnets' route tables. Run the tasks on AWS Fargate using the awsvpc network mode.
The correct configuration uses interface VPC endpoints for ECR and ECS, and gateway VPC endpoints for S3 and DynamoDB. Fargate tasks run in the awsvpc network mode and require direct private network paths to access AWS APIs. ECR stores image layers in S3, requiring the S3 gateway endpoint. Gateway endpoints for S3 and DynamoDB are highly cost-effective and have no hourly fees, matching the low-cost requirement.
Step-by-Step Solution
Key Concept
AWS Fargate private networking with ECR, ECS, and DynamoDB using VPC Endpoints