英文:
AWS Lambda caching layer using Extensions
问题
我有一个使用SSM参数存储值的Lambda函数。它查询ParameterStore并将获取的值存储在Lambda环境变量中,以便下次可以从环境变量中使用它们,而不是在ParameterStore上进行调用,如果Lambda在热状态下运行,这个方法运行良好,但在冷启动期间,我的Lambda在高峰流量期间仍然会频繁调用ParameterStore并收到限制异常。
我希望通过引入缓存层来减少对参数存储的调用次数,我在这篇文章上找到了相关信息,但我对Lambda扩展不太了解。在创建POC之前,我只是想确认这种缓存是否在冷启动之间有效。请给予建议。
提前感谢!
英文:
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!
答案1
得分: 1
AWS有一个专门用于缓存Parameter Store和Secrets Manager值的扩展:
英文:
AWS has an extension available specifically for caching Parameter Store and Secrets Manager values:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论