serverless-layers icon indicating copy to clipboard operation
serverless-layers copied to clipboard

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

Open bitsofinfo opened this issue 2 years ago • 1 comments

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

bitsofinfo avatar Jan 28 '22 06:01 bitsofinfo

Same error 🙃

sofianekorbi avatar Jan 29 '22 15:01 sofianekorbi

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.

agutoli avatar Dec 23 '22 08:12 agutoli

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

throrin19 avatar Sep 13 '23 12:09 throrin19