A serverless invoice processing application uses a Lambda function to query a relational database residing in a private subnet of a custom VPC. The function also needs to call a third-party billing service endpoint on the public internet.
Which of the following configurations are required to establish this network connectivity while maintaining secure access? (Select TWO.)
- Associate the Lambda function with the private subnets of the VPC, and route outbound internet traffic through a NAT Gateway located in a public subnet.Cevap
- Configure a security group for the Lambda function that permits outbound traffic to the database port and to the internet on HTTPS port 443.Cevap
- CPlace the Lambda function in a public subnet of the VPC and enable the default auto-assign public IP setting on the function configuration to reach the billing endpoint directly.
- DModify the Lambda function's execution role trust policy to allow inbound database connections from the security group of the database.
- EStore the database credentials in Systems Manager Parameter Store and enable the native database credential rotation feature.
Cevap
To establish network connectivity for the Lambda function, associate it with the private subnets of the VPC and route outbound internet traffic through a NAT Gateway in a public subnet. Additionally, configure the function's security group to allow outbound traffic to the database port and to the internet on HTTPS port 443.
The correct configurations are to associate the Lambda function with the private subnets of the VPC, routing outbound internet traffic through a NAT Gateway in a public subnet, and configure a security group for the Lambda function that permits outbound traffic to both the database port and HTTPS port 443. This setup ensures that the Lambda function can resolve and reach local resources like the database, while securely routing outbound internet traffic to the external endpoint via the NAT Gateway.
Adım Adım Çözüm
Anahtar Kavram
VPC Security for Lambda and Resource Access
Tahmini Süre:1m 30s