Serverless Deployment bucket error

Hi,

So in my serverless.yaml file, I am using serverless-deployment-bucket plugin .

I am trying to achieve is, to create a new bucket using this plugin and deploy my lambda function code in this custom defined bucket (created using serverless-deployment-bucket plugin ) instead of the default s3 bucket that sls framework uses.

But I am getting this following error when I am trying to deploy my lambda code :

Following is the snippet of my serverless.yaml file :

provider:
name: aws
runtime: python3.8
role: TestIAMRole
stage: dev
region: us-east-1
stackName: sample1
deploymentBucket:
name: samplebucket456754
serverSideEncryption: AES256
blockPublicAccess: true

functions:
hello:
handler: handler.hello

plugins:

  • serverless-deployment-bucket
  • serverless-puresec-cli

I didn’t find a way to reference resources from other files or environment variables within buildspec.yml like you would in serverless.yml for instance, but it’s possible to run custom scripts that can. Serverless-sync-s3buckets uses the bucket name and local directory you write in the custom attributes of your serverless.yml and sync the both up.
9Apps Showbox Tutuapp