Closed mtgnoah closed 3 years ago
Hey @mtgnoah, Image typed Lambda Functions do not support Lambda Layers. https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/
Lambda functions packaged as container images do not support adding Lambda layers to the function configuration.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
I am trying to transfer an existing project to the lambda infastructure. I have simplified lots of the code here to make it a working example but I have to import many files inside of the shared layer and folders inside of it. I want to use a layer because to help simplify the structure because their is so many packages almost 800mb worth so I don't even know if lambda is the best option or if I should use a different aws service.
The project structure is:
The template.yml file is:
I placed everything into one template file because that is how the template came.
Here is the Dockerfile
I have to run sam build --use-container or I get errors when I am trying to get the python requirements for the layer. To run a test I run sam local invoke InferenceFunction --event events/event.json I get the following output
the app.py is
System Info: Windows 10 sam 1.31.0 python 3.9
I'm not sure where the problem is: if it is my folder structure, the number of packages, or even sam itself. I have looked at issue #2335 but it still did not help fix my issues Any help or advice is very appreciated.