Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not setting ENV vars on Lambda, v1.1.2 #11

Closed
slavivanov opened this issue May 10, 2018 · 1 comment
Closed

Not setting ENV vars on Lambda, v1.1.2 #11

slavivanov opened this issue May 10, 2018 · 1 comment

Comments

@slavivanov
Copy link

slavivanov commented May 10, 2018

This plugin would read the env file but the env variables would not be set on the AWS lambda function. Maybe it was conflicting with other plugins.
I managed to fix it by adding the hook:
"before:package:initialize": this.loadEnv.bind(this)
to this.hooks in the constructor in index.js.

Maybe this would help anyone.
I'm not convinced this is an universal solution as to create a pull request.

todda00 added a commit to Concentrek/serverless-dotenv-plugin that referenced this issue May 15, 2018
@todda00
Copy link
Contributor

todda00 commented May 15, 2018

I ran into this as well. adding before:package:initialize as listed above fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants