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

provider.deploymentBucket is specified, yet error is reported that it isn't #82

Closed bitsofinfo closed 1 year ago

bitsofinfo commented 2 years ago

Using serverless 0.70.0 and the latest serverless-layers plugin

error:

Serverless: [ LayersPlugin ]: => default

 Error ---------------------------------------------------

  Error: Please, you should specify "deploymentBucket" or "layersDeploymentBucket" option for this plugin!

serverless.yml snippets:

provider:
   ...
  deploymentBucket:
    maxPreviousDeploymentArtifacts: 10
    blockPublicAccess: true
    serverSideEncryption: AES256
    tags: # Tags that will be added to each of the deployment resources
      MyEnv: ${opt:stage, 'dev'}
      MyApp: ${self:service.name}

....

custom:
  serverless-layers:
    dependenciesPath: ./package.json
    compatibleRuntimes: 
      - nodejs14.x
sofianekorbi commented 2 years ago

Same error 🙃

agutoli commented 1 year ago

Sorry for the late reply (very busy currently). So, it seems you was not specifying bucket name.

provider:
   ...
  deploymentBucket:
    name: your-bucket
    maxPreviousDeploymentArtifacts: 10
    ...

Or

custom:
  serverless-layers:
    layersDeploymentBucket: your-bucket
    dependenciesPath: ./package.json
    ....

I'm closing this issue.

throrin19 commented 1 year ago

I don't understand that error. serverless create it's own deployment bucket. Why not reuse it automatically ?