A company is deploying an application on Amazon EC2 instances located in a private subnet of a custom VPC. The application must securely retrieve database credentials from AWS Secrets Manager and also connect to a public API endpoint of an external partner over the internet.
Which of the following network configurations must the developer implement to meet these requirements while minimizing data transfer over the public internet? (Select TWO.)
- Create an interface VPC endpoint (AWS PrivateLink) for AWS Secrets Manager in the private subnet.Cevap
- Deploy a NAT gateway in a public subnet and add a route in the private subnet's route table that points 0.0.0.0/0 to the NAT gateway.Cevap
- CCreate a gateway VPC endpoint for AWS Secrets Manager and associate it with the private subnet's route table.
- DStore the database credentials in Systems Manager Parameter Store and configure a gateway VPC endpoint to retrieve them, as Parameter Store supports automatic credential rotation.
- EUpdate the trust policy of the EC2 instance's IAM role to allow assume-role actions from the Secrets Manager service endpoint.
Cevap
The correct configurations are to create an interface VPC endpoint (AWS PrivateLink) for AWS Secrets Manager in the private subnet, and deploy a NAT gateway in a public subnet with a route in the private subnet's route table pointing outbound internet-bound traffic (0.0.0.0/0) to the NAT gateway.
To satisfy both requirements under the constraint of minimizing public internet usage, the developer must: 1. Deploy an Interface VPC Endpoint (PrivateLink) for Secrets Manager so that credential requests remain entirely within the AWS network. 2. Use a NAT Gateway in a public subnet coupled with a route in the private route table to enable outbound internet access to the external payment API.
Adım Adım Çözüm
Anahtar Kavram
Configuring private subnets to securely access AWS services via VPC endpoints and external services via NAT Gateways.