IS_LOCAL env var not being set on local
bernardobelchior opened this issue ยท 4 comments
๐ Bug description
According to the AWS - Invoke Local
page in the Serverless documentation, running sls invoke local
should set the IS_LOCAL
environment variable.
I have tried with a NodeJS lambda function and the variable is set, which leads me to believe that the problem comes from this package.
๐ค Expected Behavior
The IS_LOCAL
environment variable should be set.
๐ Steps to reproduce
Having the serverless framework installed:
git clone https://github.com/bernardobelchior/serverless-report
cd serverless-report
npm install
sls invoke local -f hello
๐ Your environment
serverless version: 1.40.0
rust-plugin version: 0.3.2
OS: Linux
interesting. I'll take a look.
noting this for reference and follow up serverless/serverless#5988
I did face the same issue. I couldn't pass environment variables like that either, so it may be a problem with the framework itself.
serverless/serverless#5988 was merged.
Fix included in v1.41.0 of serverless, which should be out shortly.