So, I have tried AWS lambda layers and I have no issues with them so far. When I want to put libraries over there that my lambda functions will require after all I needed it put the package jwt-decode in a folder structure like this:
nodejs/node_modules/jwt-decode uploaded as .zip no problems.
The problem is... I want to also share my own custom code between my Lambda functions without publishing it as a npm package. Is that even possible?
Say you have a function that uses jwt-decode and decodes your access token from the authorization header event.headers.authorization then it fetches the "sub" identifier from the decoded token. I want to share this code because I don't want to write this implementation for each Lambda function that requires the sub identifier.