Serverless-offline: Can Lambda layers be used in offline mode?

Created on 9 Apr 2019  路  4Comments  路  Source: dherault/serverless-offline

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
enhancement help wanted

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

All 4 comments

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

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stonebraker picture stonebraker  路  3Comments

stunningpixels picture stunningpixels  路  3Comments

ghost picture ghost  路  4Comments

MEGApixel23 picture MEGApixel23  路  4Comments

mattmeye picture mattmeye  路  4Comments