Am I right in thinking that at runtime, your manually-specified environment variables from the Netlify UI (and, hopefully, the
toml file), are available to the Lambda, but certain “Netlify default” ones aren’t? In particular, I was hoping to be able to detect whether I’m in production or not. But I can’t see
CONTEXT in the env at runtime.
The solution I am preparing to integrate is to specify a webpack config in my
netlify-lambda build script to add
DefinePlugin so I can bake the build env’s
CONTEXT env into the JS for runtime. But it’d be good to know if there is something I’m missing that’s better.