Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Lambda layers be used in offline mode? #630

Closed
Ali-Dalal opened this issue Apr 9, 2019 · 4 comments · Fixed by #950
Closed

Can Lambda layers be used in offline mode? #630

Ali-Dalal opened this issue Apr 9, 2019 · 4 comments · Fixed by #950

Comments

@Ali-Dalal
Copy link

Ali-Dalal commented Apr 9, 2019

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
@Ali-Dalal
Copy link
Author

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

@dnalborczyk
Copy link
Collaborator

thank you, @Ali-Dalal

it might be still something worth to be looked into and possibly supported by serverless-offline

@hyacinthus
Copy link

Waiting for this feature, thanks!

@tslater
Copy link

tslater commented Oct 15, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants