softprops / serverless-rust

⚡ 🦀 a serverless framework plugin for rustlang applications
https://www.npmjs.com/package/serverless-rust
MIT License
541 stars 81 forks source link

IS_LOCAL env var not being set on local #34

Closed bernardobelchior closed 5 years ago

bernardobelchior commented 5 years ago

🐛 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

softprops commented 5 years ago

interesting. I'll take a look.

softprops commented 5 years ago

noting this for reference and follow up https://github.com/serverless/serverless/pull/5988

bernardobelchior commented 5 years ago

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.

bernardobelchior commented 5 years ago

https://github.com/serverless/serverless/pull/5988 was merged. Fix included in v1.41.0 of serverless, which should be out shortly.