Veridian Credit Union is modernizing its high-frequency ledger processing microservice by migrating it from on-premises virtual machines to AWS. The microservice will be deployed on Amazon ECS using the AWS Fargate launch type. The tasks will reside in the Production VPC across three Availability Zones in private subnets with no internet access (no NAT Gateways). The container images must be pulled from a centralized Amazon ECR repository located in a Shared Services AWS account, where the images are encrypted using a KMS key. The application also retrieves database credentials from AWS Secrets Manager in the Production account. Additionally, the application must communicate with an on-premises core banking API via an AWS Direct Connect connection attached to an AWS Transit Gateway. All network traffic to AWS services must remain within the AWS private network. Which TWO configurations must the Solutions Architect implement to meet these requirements?
- Configure the ECS task definition to use the awsvpc network mode. In the Production VPC, create VPC interface endpoints for ECR API, ECR Docker, and Secrets Manager, and a gateway VPC endpoint for Amazon S3.Answer
- In the Shared Services account, configure the ECR repository to use a Customer Managed Key (CMK) for encryption. Update the key policy of the CMK to grant kms:Decrypt and kms:DescribeKey permissions to the ECS task execution role in the Production account, and grant the role ECR read permissions in the repository policy.Answer
- CConfigure the ECS task definition to use the bridge network mode to allow container-to-container port mapping. Create a single NAT Gateway in the Production VPC to route the image pull requests to the public ECR endpoints.
- DConfigure the ECR repository in the Shared Services account to use the AWS-managed KMS key (aws/ecr) for image encryption. In the Production account, attach an IAM policy to the ECS task execution role granting kms:Decrypt permissions on the Shared Services account's aws/ecr key.
- ECreate the ECR VPC interface endpoints in the Shared Services VPC. Associate the Route 53 Private Hosted Zone created for ECR in the Shared Services VPC with the Production VPC, and route all image pull traffic transitively from the Production VPC to the Shared Services VPC endpoints over the Transit Gateway.