A developer is deploying an application on Amazon ECS (Fargate) tasks within a private subnet of a VPC. The application must retrieve database credentials from AWS Secrets Manager and publish events to an Amazon SNS topic. The company's security policy mandates that all traffic to AWS services must remain within the AWS network and must not traverse the public internet.
Which combination of configurations will meet these requirements? (Select TWO.)
- Create Interface VPC Endpoints (AWS PrivateLink) for Secrets Manager and SNS in the private subnets, and ensure private DNS hostnames are enabled for the VPC.Cevap
- Configure the security groups associated with the VPC endpoints to allow inbound traffic on port 443 from the security group of the ECS tasks.Cevap
- CDeploy a NAT Gateway in a public subnet, and configure the private subnet's route table to route traffic destined for Secrets Manager and SNS through the NAT Gateway.
- DCreate Gateway VPC Endpoints for Secrets Manager and SNS, and add routes targeting these endpoints in the private subnet's route table.
- EUpdate the trust policy of the ECS task execution role to permit the VPC endpoint services to assume the role, granting them permission to route network traffic to the tasks.
Cevap
The correct configurations are to create Interface VPC Endpoints for Secrets Manager and SNS with private DNS hostnames enabled, and to configure the security groups on the VPC endpoints to allow inbound traffic on port 443 from the ECS tasks' security group.
To connect ECS tasks in a private subnet securely to AWS services (Secrets Manager and SNS) without traversing the public internet, the developer must use Interface VPC Endpoints (AWS PrivateLink). Private DNS hostnames must be enabled so that standard SDK calls to these services resolve to the private endpoint interfaces. Additionally, because Interface VPC Endpoints use ENIs with security groups, the endpoint security groups must be configured to allow inbound traffic on port 443 (HTTPS) from the ECS tasks' security group.
Adım Adım Çözüm
Anahtar Kavram
Establishing secure, private connections from resources in a private VPC subnet to AWS services using AWS PrivateLink (Interface VPC Endpoints) and proper security group configurations.
Tahmini Süre:1m 30s