# An error occurred: ServerlessDeploymentBucket - API: s3:SetBucketEncryption Access Denied

**URL:** <https://forum.serverless.com/t/an-error-occurred-serverlessdeploymentbucket-api-s3-setbucketencryption-access-denied/11350>\
**Category:** Serverless Framework\
**Tags:** aws, iam\
**Created:** [May 5, 2020, 1:50am UTC](https://forum.serverless.com/t/an-error-occurred-serverlessdeploymentbucket-api-s3-setbucketencryption-access-denied/11350 "2020-05-05T01:50:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bill/32/1072_2.png) [@bill](https://forum.serverless.com/u/bill)\
**Post date:** [May 5, 2020, 1:50am UTC](https://forum.serverless.com/t/an-error-occurred-serverlessdeploymentbucket-api-s3-setbucketencryption-access-denied/11350/1 "2020-05-05T01:50:04Z")

</div>

One guy did a PR ([https://github.com/serverless/serverless/pull/5800](https://github.com/serverless/serverless/pull/5800)) and badly it was merged. The change added below hard codes in generated cloudformation (so there is no chance you can optional use it or not)

```auto
    "ServerlessDeploymentBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketEncryption": {
          "ServerSideEncryptionConfiguration": [
            {
              "ServerSideEncryptionByDefault": {
                "SSEAlgorithm": "AES256"
              }
            }
          ]
        }
      }
    }

```

and broken all serverless examples. The change was merged one year before, I am curious why no one going to report and fix it?

Especially most examples in [https://github.com/serverless/examples](https://github.com/serverless/examples) are broken now.

For example,

> **[serverless/examples](https://github.com/serverless/examples/tree/master/aws-node-rest-api-with-dynamodb)**
>
> Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more. - s...

> **[serverless/examples](https://github.com/serverless/examples/tree/master/aws-python-rest-api-with-dynamodb)**
>
> Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more. - s...

> **[serverless/examples](https://github.com/serverless/examples/tree/master/aws-node-ses-receive-email-body)**
>
> Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more. - s...

Because of the PR, I am getting this error now

```auto
An error occurred: ServerlessDeploymentBucket - API: s3:SetBucketEncryption Access Denied

```

I used to deploy before and they are fine.

There are so many useful examples, which I used to do show case, now I can’t use them

I have given my deploy account with administrator access permission,but I still get this error.

Someone gives some solutions with [https://github.com/serverless/serverless/issues/5919](https://github.com/serverless/serverless/issues/5919), but I don’t really understand what need be done. Any hints for me?
