-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Describe your idea/feature/enhancement
It would be great if sam local loaded env vars from a .env file instead of a non-standard --env-vars JSON file.
Proposal
Create an option --use-dotenv that will tell the docker container to load env vars from a .env file prior to launching the lambda. Vars defined in .env will apply to ALL lambda functions defined in the sam template.yml
This will eliminate the need to dual maintenance a .env and a sam-env.json file. A .env file is needed for local dev that does not need to run through a lambda simulator (for more rapid development iterations).
--env-vars is still useful for variables that are specific to an individual lambda.
Reactions are currently unavailable