AeroParts Global is modernizing its on-premises inventory lookup application by migrating it to AWS. The architecture must run on Amazon ECS using the AWS Fargate launch type to reduce management overhead. The ECS tasks will be deployed in a new VPC (VPC A) and must securely access an internal database hosted in a separate VPC (VPC B) that is connected using an AWS Transit Gateway. The database hostnames are managed via an Amazon Route 53 Private Hosted Zone (PHZ) in the AWS account containing VPC B. Which of the following should a solutions architect configure to ensure that the ECS tasks can resolve the database hostname and establish network connectivity?
- ADeploy the ECS tasks using the bridge network mode to simplify container port mapping. Associate the Route 53 Private Hosted Zone in the database account with VPC A, and configure Transit Gateway routing to direct database traffic.
- BDeploy the ECS tasks using the awsvpc network mode. Rely on the Transit Gateway network transit path to automatically route DNS queries to the DNS servers of VPC B without associating the Private Hosted Zone with VPC A, and configure Transit Gateway routing.
- Deploy the ECS tasks using the awsvpc network mode. Associate the Route 53 Private Hosted Zone in the database account with VPC A, and update the route tables in VPC A to direct database traffic to the Transit Gateway.Answer
- DDeploy the ECS tasks using the awsvpc network mode. Provision a Direct Connect Gateway to establish transitive routing between VPC A and VPC B for database traffic, and associate the Route 53 Private Hosted Zone with VPC A.
Answer
Deploy the ECS tasks using the awsvpc network mode, associate the Route 53 Private Hosted Zone in the database account with VPC A, and update the route tables in VPC A to direct database traffic to the Transit Gateway.
To run containers on AWS Fargate, the tasks must be configured with the awsvpc network mode because Fargate does not support other modes. To enable DNS resolution of the private hosted zone in VPC A, the zone must be explicitly associated with VPC A. Finally, routing database-destined traffic through the Transit Gateway is required to establish network connectivity between VPC A and VPC B.
Step-by-Step Solution
Key Concept
ECS Fargate Network Modes and Route 53 PHZ VPC Associations
Estimated Time:2m 0s