Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upchalice deploy import error, with layers #1200
Comments
|
You've got the syntax right. If you're using your own layer, I'd double check you've got the layer built correctly. I'll put together some docs for this. |
|
I think the OP means they get an import error at local packaging time, rather than when invoking the lambda function. MWE using the official AWS SciPy layer (which should get rid of wrongly-built-layer issues): First, create a new project:
Then edit some files:
Leave Now do:
(or I think the issue that you're having is that you need to |
|
Hi Thanks |
|
Hi all, Ran into the same issue presented here but was able to work around this by wrapping my imports in a try/catch. This allowed Chalice to deploy and because my layer was defined in the config.json, my application ran successfully. |
|
There was another issue where people were running into this issue as well. Due to how Chalice works, we have to import your |
|
Hi @jamesls I am looking to solve this very problem in my project and want to explore all available options over try/catch workaround. Thanks! |
|
I can't find the original comment (I believe it was from @stealthycoin), but whenever we run a commands like Another option is to make better use of the
|
Hi
I got module not found error when deploying, I specify the function to use layers
{ "version": "2.0", "app_name": "myapp", "stages": { "dev": { "api_gateway_stage": "api", "manage_iam_role": false, "iam_role_arn": "arn", "lambda_functions": { "myfunc": { "layers": ["layer1", "layer2"] } } } }, }I did not specify the module in requirements.txt since I have the layers specified. I probably missing something, could not find much docs on layers for chalice.
Thanks
Dong