NexaChem Laboratories is modernizing its laboratory information management system (LIMS) by migrating its containerized chemical analysis microservices to Amazon ECS on AWS Fargate. To comply with strict industry data privacy standards, the microservices must run in a fully private VPC containing only private subnets, with no direct access to the public internet. The container images are built and stored in a centralized Amazon Elastic Container Registry (ECR) repository located in a Shared Services AWS account, and are encrypted using an AWS Key Management Service (AWS KMS) customer managed key (CMK). The ECS tasks also need to access sensitive database credentials stored in AWS Systems Manager Parameter Store in the application account, which are encrypted using a local CMK. Which combination of configuration steps is required to allow the ECS tasks to successfully pull the container images and launch on AWS Fargate? (Select TWO.)
- Create interface VPC endpoints (AWS PrivateLink) in the application VPC for the Amazon ECR API, the ECR Docker registry, and AWS KMS. Create a gateway VPC endpoint for Amazon S3 in the application VPC, and associate it with the route tables of the private subnets where the ECS tasks are deployed.Answer
- Configure the ECR repository policy in the Shared Services account to grant read permissions to the application account's ECS Task Execution Role. Update the ECS Task Execution Role's IAM policy in the application account to allow access to ECR API actions and kms:Decrypt permissions on the KMS customer managed key located in the Shared Services account.Answer
- CConfigure the ECS task definition network mode to use host or bridge networking instead of awsvpc, allowing the tasks to leverage local Docker daemon routing to pull images from the cross-account ECR repository.
- DEncrypt the ECR repository using the default AWS-managed KMS key for ECR (aws/ecr) in the Shared Services account, and modify the key policy of this AWS-managed key to grant kms:Decrypt permissions to the application account's ECS Task Execution Role.
- ECreate a Route 53 Private Hosted Zone for the ECR endpoints in the Shared Services account, and create alias records pointing to the Shared Services VPC endpoints without associating the hosted zone with the application VPC.