"chalice deploy" removes Lambda environment variables
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Rather than [adding encrypted environment variables to my config.json file](https://github.com/aws/chalice/issues/481#issuecomment-323178711), I'd prefer to simply add them manually to Lambda (either via the web console or CLI). However, all manually added environment variables are currently being removed on every deploy. This is occurring in a project with no `environment_variables` section in the config file.
I would expect the following behaviour:
1. If there is no `environment_variables` section, all configured env vars are persisted.
2. If there is an `environment_variables` section, all non-conflicting variables should be merged. So if I have manually set `FOO`, and my `environment_variables` section contains `BAR`, the final configuration should contain both `FOO` and `BAR`.
3. For existing env vars, the `environment_variables` section should take precedence.
For context, support for Lambda environment variables was added here in PR #243 , and support for environment variables in the `.chalice/config.json` file was added in PR #273.
Contributor guide
Assessment
This issue has not been assessed yet.