A developer has built a serverless application where an AWS Lambda function, written in Python, processes payment reports. The Lambda function is configured to run inside a VPC, attached to two private subnets, to securely access a private Amazon RDS PostgreSQL database.
As part of the processing logic, the Lambda function must perform the following actions:
1. Connect to the RDS database to fetch payment transactions.
2. Query a public external credit rating API via HTTPS to validate client records.
3. Download a standard currency conversion schema from a public Amazon S3 bucket.
During testing, the Lambda function consistently runs for its maximum configured timeout of seconds and then terminates with a `Task timed out after 3.00 seconds` error. The Amazon CloudWatch logs indicate that the connection to the RDS database is established successfully, but the connections to both the external credit rating API and Amazon S3 fail to connect.
Which combination of actions should the developer take to resolve these connectivity and execution timeout issues? (Select TWO.)
- Deploy a NAT Gateway in a public subnet of the VPC, and update the private subnets' route tables to direct internet-bound traffic () to the NAT Gateway.Cevap
- Increase the Lambda function's timeout configuration to a value greater than seconds (such as seconds) to accommodate network transit and API latency.Cevap
- CRelocate the Lambda function to the public subnets of the VPC and enable the auto-assign public IP option on those subnets to establish direct internet access.
- DCreate an Internet Gateway and associate it directly with the private subnets' route tables to provide an outbound pathway for the Lambda function.
- EConfigure the Lambda function to tear down and recreate the database connection pool at the end of each handler execution to clear the cached execution context.