A backend service uses an AWS Lambda function to process data files uploaded to Amazon S3. During execution, the function stops processing before completing, and the Amazon CloudWatch logs report that the function reached its configured execution limit of . Which action should the developer take to resolve this issue?
- Increase the timeout configuration parameter of the Lambda function.Cevap
- BModify the function code to clear the execution context cache after every iteration of the file processing loop.
- CConfigure the Lambda function to run inside a public subnet of a custom VPC to establish a direct connection to Amazon S3.
- DHardcode temporary AWS access keys within the SDK client initialization to speed up authorization checks.
Cevap
Increase the timeout configuration parameter of the Lambda function.
The correct action is to increase the timeout configuration of the Lambda function. When a Lambda function hits its configured execution limit, AWS Lambda terminates the container. If the workload simply requires more time to run (e.g., parsing a larger file), the configuration must be updated to a higher timeout value.
Adım Adım Çözüm
Anahtar Kavram
AWS Lambda execution timeout configuration