lambda-secrets-prefetch | Lambda extension to pre-fetch secrets | Cloud Functions library
kandi X-RAY | lambda-secrets-prefetch Summary
kandi X-RAY | lambda-secrets-prefetch Summary
Lambda extension to pre-fetch secrets from AWS SecretsManager. This tool is discussed in detail in our blog post.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- register creates a new event id
- populateSecrets populates the secrets manager for secrets manager
- next runs the next identifier
- getConfig loads a config file
- getSecret retrieves a secret from an existing secret
- Main entry point
- putSecret writes the secret to the target directory
- SetLogLevelFromEnv sets the log level from environment
- handleSecret is used to fetch a secret
- New returns a new AWSSecrets client
lambda-secrets-prefetch Key Features
lambda-secrets-prefetch Examples and Code Snippets
Community Discussions
Trending Discussions on lambda-secrets-prefetch
QUESTION
I'm trying to improve the cold start performance of a lambda. One of the things that takes time at startup is fetching information from the secrets manager.
I've found a few solutions that talk about caching information from secrets manager using lambda extensions.
- https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/cache-secrets-using-aws-lambda-extensions.html
- https://github.com/square/lambda-secrets-prefetch
- https://github.com/hariohmprasath/aws-lambda-extensions
If you cached a request from secrets manager, using the lambda extension approach, is it cached only for that instance of the lambda or is it cached for all instances of the lambda?
If it's cached for all instances then in theory it would help me reduce cold start times.
...ANSWER
Answered 2022-Jan-19 at 08:29Unfortunately, it is cached only for that instance of the lambda.
Extensions are running inside the same container with the lambda. Therefore, they will not share memory between different instances of the lambda. More specifically, every time that a lambda has a cold start - a fresh process of the extensions is being executed.
Disclaimer: I just published a post explaining more about extensions: https://aws.amazon.com/blogs/apn/zero-friction-aws-lambda-instrumentation-a-practical-guide-to-extensions/ I believe that it will help you understand more about that power of extensions, and how it can help you in other ways.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lambda-secrets-prefetch
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page