theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
270 stars 48 forks source link

Don't read context environment variables on every call #75

Closed dnikolovv closed 4 years ago

dnikolovv commented 4 years ago

If we look at the initialize function here and then how it's used here we can see that there are 5 environment variables that are being read on every call.

This can be done on cold start only, as none of these variables will change without the lambda being refreshed. (I'm not totally sure about logStream and logGroup)