There is no clear cut example to access code (not a dependecy like moment.js) from your layer in a lambda function. I would like to know how to access my files from my layer in my function. The layer itself is connected to my function but accessing the file gives me module not found. /opt/nodejs/somefolder/thefileIneed When I list the directories using nodejs file system I see that it all exists but when I use require, webpack does not bundle it.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
SLS can't get Lambda Layers to deploy/upload | 0 | 1164 | December 13, 2018 | |
AWS Lambda Layers :: How to add and require a simple js file from a lambda layer | 4 | 5516 | August 22, 2019 | |
Lambda Layers & Node & require the layer code & sls invoke local | 15 | 14760 | June 24, 2021 | |
AWS Lambda Layers - Node Modules not working | 4 | 11200 | July 1, 2021 | |
Lambda layer to Project | 0 | 395 | January 16, 2023 |