title: Serverless Framework - AWS CloudFront distribution S3 bucket access configuration
body: <p>I'm deploying a AWS Cloudfront distribution with the serverless-api-cloudfront plugin.</p>
  <p>This distribution has a S3 origin configured which works as expected.</p>
  <p>Configuration:</p>
  <pre><code>plugins:
  - serverless-api-cloudfront
  
  mywebapp:
     component: &quot;@sls-next/serverless-component@3.6.0&quot;
     inputs:
        env:
           ...
        cloudfront:
           defaults: # options for lambda that handle SSR
              ...
           origins:
              - url: https://...
                S3OriginConfig:
                    OriginAccessIdentity:
                pathPatterns:
                    secure/exports/*:
                      minTTL: 10
                      maxTTL: 10
                      defaultTTL: 10
                      forward:
                        cookies: &quot;none&quot;
                        queryString: true
      ...
  </code></pre>
  <p>My problem is that When my distribution is depoyed, the S3 bucket access configuration of my S3 origin is always set to &quot;Yes use OAI (bucket can restrict access to only CloudFront)&quot; and I would like it to be &quot;Don't use OAI (bucket must allow public access)&quot;.</p>
  <p><a href="https://imgur.com/6Aagn0T" rel="nofollow noreferrer">https://imgur.com/6Aagn0T</a></p>
  <p>Any idea on how to configure this?</p>