title: For an Amazon S3 bucket deplolyent from Guithub how do I fix the error AccessControlListNotSupported: The bucket does not allow ACLs?
body: <p>I have the following access policy set on an IAM user in my AWS account. The policy references the bucket name which is &quot;xo-staging&quot;.</p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Sid&quot;: &quot;AccessToGetBucketLocation&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;s3:GetBucketLocation&quot;
              ],
              &quot;Resource&quot;: [
                  &quot;arn:aws:s3:::*&quot;
              ]
          },
          {
              &quot;Sid&quot;: &quot;AccessToWebsiteBuckets&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;s3:PutBucketWebsite&quot;,
                  &quot;s3:PutObject&quot;,
                  &quot;s3:PutObjectAcl&quot;,
                  &quot;s3:GetObject&quot;,
                  &quot;s3:ListBucket&quot;,
                  &quot;s3:DeleteObject&quot;
              ],
              &quot;Resource&quot;: [
                  &quot;arn:aws:s3:::xo-staging&quot;,
                  &quot;arn:aws:s3:::xo-staging/*&quot;
              ]
          },
          {
              &quot;Sid&quot;: &quot;AccessToCloudfront&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;cloudfront:GetInvalidation&quot;,
                  &quot;cloudfront:CreateInvalidation&quot;
              ],
              &quot;Resource&quot;: &quot;*&quot;
          }
      ]
  }
  </code></pre>
  <p>I'm deploying a Gatsby application from my local machine to Github where I am using Github Actions to run a build and deploy script.</p>
  <p>In my package.json file I have set &quot;deploy&quot; to the value of <code>gatsby-plugin-s3 deploy --yes; export AWS_PAGER=\&quot;\&quot;; aws cloudfront create-invalidation --distribution-id E5FDMTLPHUTLTL --paths '/*'; </code> in my workflows.yml file I have set &quot;deploy&quot; to <code>npm run deploy</code>.</p>
  <p>In Github my build succeeds but my deploy fails. The error I get tells me <em><strong>&quot;AccessControlListNotSupported: The bucket does not allow ACLs&quot;.</strong></em></p>
  <p>I've checked the actual bucket permissions in AWS and tried selecting different options, but always the same error message returns. In other words, I have tried removing all blocks on public access and ACLs but still the problem persists.</p>
  <p>Please can someone suggest what I might need to change to get this full deploy working?</p>