A biotechnology research company, GeneSphere, is modernizing its legacy genomic analysis suite by migrating it from on-premises virtual machines to AWS. The company has containerized the workload and wants to deploy it using Amazon ECS with the AWS Fargate launch type for administrative simplicity.
The architecture comprises a multi-account AWS environment managed via AWS Organizations. The container images are stored in a centralized Amazon Elastic Container Registry (ECR) repository in a Shared Services account. The ECS tasks will be deployed in a separate Production account across three Availability Zones within a private subnet of the Production VPC.
For regulatory compliance, the deployment must meet the following requirements:
1. All traffic between the Fargate tasks and AWS services (Amazon ECR and Amazon S3) must remain private within the AWS network without traversing the public internet.
2. The Fargate tasks must resolve internal service endpoints (e.g., service.internal.local) hosted in the Shared Services VPC using a Route 53 Private Hosted Zone (PHZ) managed in the Shared Services account.
3. The network design must be highly available with no single point of failure.
Which configuration meets these requirements with the least operational overhead?
- Configure the ECS task definition to use the awsvpc network mode. In the Production VPC, create Interface VPC endpoints for Amazon ECR (ecr.dkr and ecr.api) and a Gateway VPC endpoint for Amazon S3. In the Shared Services account, authorize the association of the Route 53 Private Hosted Zone with the Production VPC, and then associate it from the Production account. Configure the Production ECS task execution role and the Shared Services ECR repository policy to allow cross-account access.Cevap
- BConfigure the ECS task definition to use the host network mode to optimize container networking performance. Create Interface VPC endpoints for Amazon ECR and a Gateway VPC endpoint for Amazon S3 in the Production VPC. In the Shared Services account, authorize the association of the Route 53 Private Hosted Zone with the Production VPC, and then associate it from the Production account. Configure the task execution role and ECR policy for cross-account access.
- CConfigure the ECS task definition to use the awsvpc network mode. In the Production VPC, create Interface VPC endpoints for Amazon ECR and a Gateway VPC endpoint for Amazon S3. Configure an AWS Transit Gateway between the Production VPC and the Shared Services VPC to automatically route DNS queries to the Shared Services Route 53 Private Hosted Zone without needing explicit hosted zone associations. Set up cross-account ECR permissions.
- DConfigure the ECS task definition to use the awsvpc network mode. In the Production VPC, deploy a single NAT Gateway in one Availability Zone to route all outbound ECR and S3 traffic through the public internet. Associate the Shared Services Route 53 Private Hosted Zone with the Production VPC using cross-account authorization. Configure the task execution role and ECR policy for cross-account access.