Hello,
Recently, I noticed one of the lambda functions has an error that randomly occurs. The function has "AWS Parameters and Secrets Lambda Extension" as a lambda layer to load and cache the configs from AWS Systems Manager Parameter Store and AWS Secrets Manager!
After debugging and trying to reproduce the error, I found out the error will not occur after the lambda function retry so my assumption was the extension layer API is not ready to work! It might be related to the lambda cold start situation!
Immediately after that, I thought of making a retry to the extension layer API instead of letting lambda trigger a retry and sending an error log to the monitoring platform!
Here is a basic retry implementation for the fetch function of JavaScript.
If you are interested in using the extension here is the AWS blog post Using the AWS Parameter and Secrets Lambda extension to cache parameters and secrets.
Top comments (0)