Bref Internal Events for Loading Environment Variables #1929
-
|
Hi We’re running several Laravel services with Bref and are on the 4KB environment variable limit. To work around this, we’ve developed a package that loads a single SecretsManager secret (key/value) and parses the pairs into environment variables - resulting in a single API call that theoretically allows an additional 64KB of variables. This is cached in the same way as brefphp/secrets-loader. I'm not sure I can make our repository public, but we’re using a Composer autoloader file to subscribe, similar to mnapoli/sqlite-s3. Where is best to trigger this? The Calling the secrets loader within a handler is another option, but we’re concerned that some environment variables might be needed before the handler executes - though likely only those used internally by Bref. Given that Bref’s code marks EventSubscribers as experimental and unstable, would you recommend using them for this, or is it safer to load secrets within the handler while keeping any non-application environment variables in Lambda? Appreciate any guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
It's worth noting that even when using the |
Beta Was this translation helpful? Give feedback.
-
|
Bumping on our Slack discussion, FYI #1931 |
Beta Was this translation helpful? Give feedback.
Bumping on our Slack discussion, FYI #1931