Support for Python 3.6 & removing requirement to store secrets/environment values in the config file #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 3.6 Support (Local Environment)
Building and deploying lambda functions wasn't working with python3.6. The issue was that the default encoding for files is UTF-8 and we're opening up the zip files to create or update a function. We were getting the following error in the read() method in the helper module.
I added an optional parameter to the helper.py read() call that defines whether the file is binary or not. This allows us to read the zip file during deployment.
To assist users that are using the python3.6 runtime, I also added the default "runtime" value to the config.yaml file (making it more obvious where the configuration for the runtime is)
"Secret" Environment Variable Values
To match our best practices of not including "secrets" in any files checked into our code repository, I added the ability to load environment variable values from the local environment instead of having them hard-coded in the config file. This is just a change in the way the value is defined. Environment values can be set using the following syntax (see env3) and the values are read at deploy time.