Soru

Zorluk: OrtaModernizing Workloads using Containers (ECS and EKS)

Solas Energy is modernizing its on-premises grid monitoring application by migrating it to AWS. The application consists of a Java-based API and a worker service that processes telemetry data. The target state requires hosting the containers on Amazon ECS with AWS Fargate for serverless operations. The API must be accessible only from a consumer VPC in a separate AWS account via a private connection. The worker service requires access to an Amazon DynamoDB table in the same account and must pull container images from a centralized Amazon ECR repository in a shared services account. The migration design must ensure high availability, use private endpoints, and avoid traversing the public internet.

Which combination of actions should the Solutions Architect implement to meet these requirements? (Select TWO.)

  1. Configure the ECS task definitions to use the awsvpc network mode, and deploy interface VPC endpoints for Amazon ECR and ECS, along with a gateway VPC endpoint for Amazon S3 in the application VPC.Cevap
  2. In the shared services account, configure the Amazon ECR repository policy to grant read access to the application account's ECS task execution role, and configure the Customer Managed Key (CMK) policy used for repository encryption to grant decryption permissions to the same role.Cevap
  3. C
    Configure the ECS task definitions to use host networking mode to minimize container-to-container latency and map container ports directly to the underlying host interface on AWS Fargate.
  4. D
    Encrypt the Amazon ECR repository in the shared services account using the AWS-managed KMS key for ECR, and update the key policy to delegate cross-account decryption permissions to the task execution role.
  5. E
    Configure the application VPC's private subnets to route traffic destined for Amazon ECR and Amazon DynamoDB through a single NAT Gateway deployed in a single public subnet to ensure secure outbound communication.

Cevap

Configure the ECS task definitions to use the awsvpc network mode, deploy interface VPC endpoints for Amazon ECR and ECS, and a gateway VPC endpoint for Amazon S3. In the shared services account, configure the ECR repository policy and the Customer Managed Key (CMK) policy to grant read and decrypt access to the task execution role.
The correct options ensure secure, private container deployments on AWS Fargate. Deploying tasks in the awsvpc network mode is a requirement for Fargate, and leveraging interface VPC endpoints for ECR/ECS along with gateway endpoints for S3 ensures that images are pulled without traversing the public internet. Cross-account access to the container images requires granting pull permissions on the ECR repository policy and decrypt permissions on the Customer Managed Key encrypting the repository to the application account's task execution role.

Adım Adım Çözüm

1
Select the correct container network mode and define VPC endpoints.
Using the awsvpc network mode allows Fargate tasks to get their own elastic network interfaces. Deploying interface VPC endpoints for ECR and ECS, and a gateway endpoint for S3, ensures that Fargate can pull image layers securely without routing out to the public internet.
AWS Fargate requires the awsvpc network mode, and PrivateLink endpoints are required to keep traffic private.
2
Configure cross-account permissions for the ECR repository and KMS key.
Updating the ECR repository policy and the Customer Managed Key policy allows the task execution role in the target account to pull and decrypt the container image.
AWS-managed KMS keys cannot be shared cross-account, so a Customer Managed Key is necessary for ECR image decryption.

Anahtar Kavram

To modernize workloads using ECS on Fargate, you must use the awsvpc network mode, secure container registries using PrivateLink, and correctly configure cross-account access via Customer Managed Keys.
Bu soruyu puanla