A developer is troubleshooting an AWS Lambda function that processes incoming sensor telemetry. The function is configured to run inside a custom VPC and must write data to an Amazon Aurora PostgreSQL database located in a private VPC subnet. Additionally, the Lambda function must call a public HTTPS endpoint of an external device registry for validation on each invocation.
The function configuration is associated with two subnets: `subnet-0a` (a private subnet with a route to a NAT Gateway) and `subnet-0b` (a public subnet with a route to an Internet Gateway). During execution, the developer observes that connection attempts to the Aurora database succeed of the time. However, approximately of the Lambda invocations fail due to connection timeouts when the function attempts to call the external validation API.
Which of the following actions will resolve the execution timeouts while maintaining access to both the database and the external API?
- Modify the Lambda function configuration to associate only with the private subnet (subnet-0a), removing the association with the public subnet (subnet-0b).Answer
- BEnable public IP assignment on the Elastic Network Interfaces (ENIs) generated by Lambda and assign an Elastic IP to the function's execution role.
- CIncrease the Lambda function timeout from seconds to minutes and allocate more memory to increase the network bandwidth.
- DChange the route table of the public subnet (subnet-0b) to direct outbound traffic () to the NAT Gateway in the private subnet (subnet-0a).