Aetheris Health is modernizing its legacy patient data processing application by migrating it to Amazon ECS. The Solutions Architect must design a highly secure, containerized architecture that runs in private subnets with no internet gateway or NAT gateways. The application must pull container images from a central Amazon ECR registry located in a shared services AWS account, and read encrypted patient datasets from an Amazon S3 bucket in a separate storage AWS account. The data in the S3 bucket is encrypted using an AWS KMS Customer Managed Key (CMK) in the storage account. To optimize container-to-container communication, the development team has requested configuring the tasks to use the `bridge` network mode on AWS Fargate. Which architecture should the Solutions Architect recommend to meet these requirements with the lowest operational overhead?
- AConfigure the ECS task definition to use the bridge network mode on AWS Fargate to enable dynamic port mapping. Create Interface VPC Endpoints in the application VPC for ECR and AWS KMS, and a Gateway VPC Endpoint for S3, with Private DNS enabled. Grant the ECS Task Execution Role ECR pull permissions, and configure the ECR repository policy to trust this role. Configure the ECS Task Role to read S3 and decrypt the data using the Customer Managed Key.
- BConfigure the ECS task definition to use the awsvpc network mode on AWS Fargate. Create Interface VPC Endpoints in the application VPC for ECR (ecr.dkr and ecr.api) and AWS KMS, and a Gateway VPC Endpoint for S3, with Private DNS enabled. Grant the ECS Task Execution Role ECR pull permissions, and trust it in the ECR repository policy. Configure the ECS Task Role with permissions to read from the S3 bucket, encrypting and decrypting the bucket using the default AWS-managed KMS key (aws/s3) to simplify cross-account key management.
- Configure the ECS task definition to use the awsvpc network mode on AWS Fargate. Create Interface VPC Endpoints in the application VPC for ECR (ecr.dkr and ecr.api) and AWS KMS, and a Gateway VPC Endpoint for S3, with Private DNS enabled. Grant the ECS Task Execution Role permissions to pull ECR images, and configure the ECR repository policy in the shared services account to trust this role. Grant the ECS Task Role permissions to read S3 and decrypt KMS, and update the Customer Managed Key policy in the storage account to allow kms:Decrypt for the ECS Task Role.Cevap
- DConfigure the ECS task definition to use the awsvpc network mode on AWS Fargate. Deploy an AWS Transit Gateway connected to a shared services VPC containing a single NAT Gateway to route ECR and S3 traffic. Create a Route 53 Private Hosted Zone for the ECR endpoints in the shared services account and manually associate it with the application VPC. Use the ECS Task Execution Role for both pulling images and decrypting the S3 objects using the Customer Managed Key.