title: my Django website style broken after configure aws S3 storage
body: <p>My website index.html style broken after I configure aws S3. I added following code in my settings.py:</p>
  <pre><code>AWS_S3_ACCESS_KEY_ID = &quot;my_key&quot;
  AWS_S3_SECRET_ACCESS_KEY = &quot;my_key&quot;
  AWS_STORAGE_BUCKET_NAME = &quot;my_bucket_name&quot;
  AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
  AWS_S3_OBJECT_PARAMETERS = {'CacheControl': 'max-age=86400'}
  AWS_DEFAULT_ACL = &quot;public-read&quot; 
  
  INSTALLED_APPS = [
          'storages',
  ]
  
  AWS_LOCATION = 'static'
  STATIC_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)
  STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
  </code></pre>
  <p>when I am opening any image url or stylesheet url like this <code>https://mydomain.com.s3.amazonaws.com/static/theme/assets/js/main.js</code> I am seeing below message  :</p>
  <pre><code>&lt;Error&gt;
  &lt;Code&gt;AccessDenied&lt;/Code&gt;
  &lt;Message&gt;Access Denied&lt;/Message&gt;
  &lt;RequestId&gt;HHT43N24VA3Q7QHC&lt;/RequestId&gt;
  &lt;HostId&gt;z5UvXR8RJU5U9H4IY4f2ntuw1dqF6tk4Vts7s+riqaQI5FJT5/H+u8TI8LnMFbH+uAUPwgR8Kp4=&lt;/HostId&gt;
  &lt;/Error&gt;
  </code></pre>
  <p>should I put anything's in aws Bucket policy and Cross-origin resource sharing (CORS)?</p>
  <p><strong>updated1:</strong></p>
  <p>I added permission to public. I turned off Block all public access and also added Bucket policy and Cross-origin resource sharing (CORS).</p>
  <p><strong>Bucket policy</strong></p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Id&quot;: &quot;Policy294......&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Sid&quot;: &quot;Stmt859....&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Principal&quot;: &quot;*&quot;,
              &quot;Action&quot;: [
                  &quot;s3:DeleteObject&quot;,
                  &quot;s3:GetObject&quot;
              ],
              &quot;Resource&quot;: &quot;arn:aws:s3:::my-bucket-name/*&quot;
          }
      ]
  }
  </code></pre>
  <p><strong>Cross-origin resource sharing (CORS)</strong></p>
  <pre><code>[
      {
          &quot;AllowedHeaders&quot;: [
              &quot;*&quot;
          ],
          &quot;AllowedMethods&quot;: [
              &quot;GET&quot;
          ],
          &quot;AllowedOrigins&quot;: [
              &quot;*&quot;
          ],
          &quot;ExposeHeaders&quot;: []
      }
  ]
  </code></pre>
  <p>now I am not seeing any error in url and content serving from aws s3 but still now my site style broken. where I am doing wrong?</p>