agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
229 stars 54 forks source link

Unable to attach layers to the existing lambda #97

Closed VaddeRam closed 1 year ago

VaddeRam commented 2 years ago

I'm trying to attach common layers to the 5 lambda functions

image

Have defined one sample function in the code,

service: user-rep description: user-rep-tool frameworkVersion: ^3.0.0 useDotenv: true

plugins:

package: individually: true

serverless-layers: layersDeploymentBucket: ${self:service}-tool-${self:provider.stage}-layers functions: # optional

provider: name: aws region: ${opt:region, 'us-east-1'} runtime: nodejs14.x

functions: query-affiliates: handler: src/lambda/query-affiliates/index.handler architecture: arm64

MHekert commented 2 years ago

I had the same issue when upgrading from 2.5.2 to 2.5.4. Additionally, it removed layers that were already added to lambdas. Downgrade to 2.5.2 fixed it for me.

ivanmartos commented 2 years ago

I had similar issue with 2.5.4. Downgrade to 2.5.3 solved it

agutoli commented 1 year ago

Bugfix (not release yet) https://github.com/agutoli/serverless-layers/pull/128