A company is building a financial transactions API where an AWS Lambda function, attached to private subnets in a custom VPC, must query a private Amazon Aurora MySQL database. The function also needs to retrieve database credentials from AWS Systems Manager Parameter Store and dispatch transaction receipts to an external payment gateway. Security policies mandate that database traffic and credentials retrieval must not traverse the public internet. Which combination of network configurations and security settings will allow the function to perform all required tasks?
- Associate the Lambda function with the private subnets. Create an interface VPC endpoint for Systems Manager in the private subnets. Deploy a NAT Gateway in a public subnet, and configure the private subnets' route table with a route for pointing to the NAT Gateway.Cevap
- BAssociate the Lambda function with the private subnets. Rely on the default VPC subnet routing to reach the external payment gateway and Systems Manager without deploying a NAT Gateway or VPC endpoints.
- CAssociate the Lambda function with the private subnets. Store the database credentials in Systems Manager Parameter Store and enable automatic credential rotation. Deploy a NAT Gateway in a public subnet, and configure the private subnets' route table with a route for pointing to the NAT Gateway.
- DAssociate the Lambda function with the private subnets. Configure the trust policy of the Lambda execution role to trust ssm.amazonaws.com so that the service can retrieve the credentials. Deploy a NAT Gateway in a public subnet, and configure the private subnets' route table with a route for pointing to the NAT Gateway.
Cevap
Associate the Lambda function with the private subnets. Create an interface VPC endpoint for Systems Manager in the private subnets. Deploy a NAT Gateway in a public subnet, and configure the private subnets' route table with a route for pointing to the NAT Gateway.
The correct configuration establishes private connectivity to AWS Systems Manager Parameter Store using an Interface VPC Endpoint, avoiding the public internet. At the same time, it uses a NAT Gateway in a public subnet to allow the Lambda function to securely route outbound internet traffic to the external payment gateway.
Adım Adım Çözüm
Anahtar Kavram
VPC endpoints allow private access to supported AWS services, whereas resources inside private subnets must use a NAT Gateway in a public subnet to communicate with external internet services.
Tahmini Süre:2m 0s