Venkat Papana
Venkat Papana

Reputation: 4937

AWS Lambda caching layer using Extensions

I have a lambda function that uses SSM ParameterStore values. It queries the ParameterStore and stores the fetched values in Lambda env variables so that next time it can use them from env variables instead of making calls to the ParameterStore which is working fine if the lambda is in a hot-state, but during the cold start still, my lambda is making many calls to ParameterStore during peak traffic and getting throttling exceptions.

I'm looking to reduce the num of calls to the parameter store by having a caching layer, I found this article online, but I'm new to Lambda extensions. I just wanted to check if this caching works between the cold starts or not before I create a POC. please advise.

Thanks in advance!

Upvotes: 0

Views: 698

Answers (1)

Jason Capriotti
Jason Capriotti

Reputation: 2060

AWS has an extension available specifically for caching Parameter Store and Secrets Manager values:

https://aws.amazon.com/blogs/compute/using-the-aws-parameter-and-secrets-lambda-extension-to-cache-parameters-and-secrets/

Upvotes: 1

Related Questions