So, I tried the offline approach with local lambda layers, but that didn't work
this is the files tree
severless-test
nodejs
node_modules
package.json
handler.js
package.json
serverless.yaml
and serverless.yaml content is
service: serverless-test
provider:
name: aws
runtime: nodejs8.10
stage: dev
plugins:
- serverless-offline
layers:
layer1:
path: nodejs
name: ${self:provider.stage}-layerName
functions:
hello:
handler: handler.hello
layers:
- {Ref: Layer1LambdaLayer}
events:
- http:
path: /dev
method: get
I figure out a solution for this
Hope this will help anyone else looking for the same thing
thank you, @Ali-Dalal
it might be still something worth to be looked into and possibly supported by serverless-offline
Waiting for this feature, thanks!
I love the layers feature. Killer. I noticed "Local layers aren't supported as yet." My upload speeds are so horrendous that this is proving to slow me way down in my dev cycle. I'm wondering if there is already an issue for this (I couldn't find one), or anyone working on it?
Most helpful comment
I figure out a solution for this
https://stackoverflow.com/questions/55590156/serverless-offline-undefined-module-when-loaded-from-lambda-layer/55606906#55606906
Hope this will help anyone else looking for the same thing