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

Not automatically attaching layer to function #95

Closed NeilJ247 closed 2 years ago

NeilJ247 commented 2 years ago

I have a single function but when running sls deploy it is not attaching the layer to it. I've tried defining the function in the serverless-layers config but it just skips it.

Related output:

(Skipped) function.contactVerified - because it has no other layers

Config:

custom:
  serverless-layers:
    dependenciesPath: ./lambda/layers/package.json
    layersDeploymentBucket: mybucket

functions:
  contactVerified:
    timeout: 900
    handler: lambda-dist/lambda/src/functions/contact-verified.handler

Serverless info:

sls --version
Framework Core: 2.72.3
Plugin: 5.5.4
SDK: 4.3.1
Components: 3.18.2
NeilJ247 commented 2 years ago

Nevermind looks like it did but I possibly hadnt refreshed the Lambda console