rackerlabs / lambda-uploader

Helps package and upload Python lambda functions to AWS
Apache License 2.0
270 stars 56 forks source link

Change default config file location to "function directory/lambda.json" #138

Closed jeffzi closed 3 years ago

jeffzi commented 7 years ago

Previously, without providing config file with --config argument, lambda-uploader would look for the config file in the directory where it was executed, not the function directory.

This behavior is not clearly stated in the README. The example also stores the config file and function in the same directory. Calling lambda-uploader from the root directory of the repository - lambda-uploader example - will raise an exception "lambda.json not a valid configuration file". Moreover, the if condition _load_config in Config._load_config can never be true because the default for the --config argument is 'lamba.json'.

This commit modifies the default config location to "function directory/lambda.json" to follow the expected behavior.