You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first creates and then removes just generated .env. Sample output:
Serverless: DOTENV: Could not find .env file.
Serverless: Creating .env file...
Serverless: Removed .env file
same happens for sls package and other commands which seems to be expected according to after:deploy hooks, but shouldn't happen for a manual generation?
Running serverless v1.51.0
The text was updated successfully, but these errors were encountered:
Looked through the code and it seems to be working as designed.
In my case, though, I run the app both as a server (with Koa + serverless-http) and as a Lambda function. I keep env variables in environment.yml, generate single .env which is used by both.
So, keeping .env file is important.
I created a pull request to accept an option sls env generate -keepEnvFile to keep it: #12
Thing is, it's kind of going against the purpose of having no unencrypted credentials longer than necessary on your file system.
We'll have a look into it and coming back to you as soon as possible.
In my case I need the ability to use secrets in a Lambda@Edge function. Since it doesn't support environment variables, the only way you can really get this to work is to include a .env file with the deployment. I think a -packageEnvFile option would be really nice to have in this case.
running
first creates and then removes just generated .env. Sample output:
same happens for
sls package
and other commands which seems to be expected according toafter:deploy
hooks, but shouldn't happen for a manual generation?Running
serverless v1.51.0
The text was updated successfully, but these errors were encountered: