Hi, I have seen a lot of posts regarding lambda layers and local invoke, but none that are recent (in the last year). I’m wondering if there is any update or if my pattern is wrong.
(previous post: issue 7963 on this forum - not able to post link)
I am trying to simply share code between services in a Python monorepo. In my opinion, this seems like a really common use case, so I’m confused why there is such little info on it. Perhaps I’m going against the correct patterns.
I followed this folder structure for lambda layers, which works when deployed: aws lambda - How to share code in serverless with Python properly? - Stack Overflow
But the problem is that invoke local does not work, since the module cannot be found. This makes sense, since locally the import line wouldn’t be able to find the layer code.
I actually am able to get it working with this hack, but it’s really ugly and could lead to issues later on: Sharing Python code as a lambda layer using the Serverless framework - Stack Overflow
Any other recommendations?