Open gamename opened 7 years ago
So this is looking for the lambda.json in the CWD so when you are specifying your function path ./ngd but not your config the lambda-uploader is looking in the current working directory and not the ./ngd directory. If you run the command from the function directory or specify the config path it should work.
We usually treat our Python code as a package and put the lambda.json in the root of the project repo.
I am hesitant to change the functionality in this since people may be using it this way. Perhaps searching for the config in both the package directory and then the CWD would make more sense. @martinb3 Any thoughts on that?
@jarosser06 Thanks for the quick reply. Much appreciated.
Yeah, I figured out that I have to pass an explicit path to the json file. Its an added hassle to pass the lambda.json file location, but its manageable.
My Makefile was working like this:
build:
lambda-uploader --publish ./ngd
Now it requires:
build:
lambda-uploader --publish ./ngd \
--config ./ngd/lambda.json
Again, that's a bit messier, but I can live with it as long as it works.
FWIW, I would +1 on having it look for lambda.json in the same location as the code being published. If I point it at a folder, I expect it to look there for both code AND configuration. Doesn't make any sense to me that I have to explicitly tell it to look in the same folder for both - especially for simple projects that are just lambda.json and function.py.
The reason we did that was because we have a number of large projects where the code is in a specific directory and the config is elsewhere. For smaller projects I agree it probably would make sense to look in the directory passed. To make it backwards compatible I think I'm just going to have it look first in the code directory and then in the CWD.
Hi,
I just upgraded and am having problems with a lambda.json file that previously worked. Can you tell me what I'm doing wrong?
Here is my version
I'm getting this error:
This is the content of my lambda.json file (with account redacted):