title: Images got uploaded on AWS S3 bucket but it's not showing on Django heroku app
body: <p>I pushed my django app on heroku and i am able to upload media files from my website admin pannel to AWS s3 bucket. But those media files doesn't render on the website.
  <em><strong>here is my settings files</strong></em></p>
  <pre><code>import os
  import datetime
  AWS_USERNAME = 'rahul'
  AWS_GROUP_NAME = 'new_brdy_eng_group'
  AWS_ACCESS_KEY_ID = os.environ.get(&quot;xxxxxxxxxx&quot;) 
  AWS_SECRET_ACCESS_KEY = os.environ.get('xxxxxxxxxxx') 
  
  AWS_PRELOAD_METADATA = True
  AWS_QUERYSTRING_AUTH = False
  AWS_S3_SIGNATURE_VERSION = &quot;s3v4&quot;
  AWS_S3_REGION_NAME = 'ap-south-1'
  
  
  DEFAULT_FILE_STORAGE = 'BE.aws.utils.MediaRootS3BotoStorage'
  STATICFILES_STORAGE = 'BE.aws.utils.StaticRootS3BotoStorage'
  AWS_STORAGE_BUCKET_NAME = 'brdy-engineers'
  S3DIRECT_REGION = 'ap-south-1'
  S3_URL = '//%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
  MEDIA_URL = '//%s.s3.amazonaws.com/media/' % AWS_STORAGE_BUCKET_NAME
  MEDIA_ROOT = MEDIA_URL
  STATIC_URL = S3_URL + 'static/'
  ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
  
  AWS_DEFAULT_ACL = None
  </code></pre>
  <p>I changed <em><strong>MEDIA_URL</strong></em> like these also</p>
  <pre><code>MEDIA_URL = '//%s.s3-ap-south-1.amazonaws.com/media/' % AWS_STORAGE_BUCKET_NAME
  MEDIA_URL = 'https://brdy-engineers.s3.ap-south-1.amazonaws.com/media/'
  MEDIA_URL = 'https://brdy-engineers.s3.ap-south-1.amazonaws.com/media/Homefiles/reviews/'
  </code></pre>
  <p><strong>But None of these worked</strong></p>
  <p><strong>utils.py file</strong></p>
  <pre><code>from storages.backends.s3boto3 import S3Boto3Storage
  
  StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static')
  MediaRootS3BotoStorage  = lambda: S3Boto3Storage(location='media')
  </code></pre>
  <p><strong>Bucket Policy</strong></p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Sid&quot;: &quot;Allow All&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Principal&quot;: &quot;*&quot;,
              &quot;Action&quot;: [
                  &quot;s3:GetObject&quot;,
                  &quot;s3:PutObject&quot;,
                  &quot;s3:PutObjectAcl&quot;,
                  &quot;s3:*&quot;
              ],
              &quot;Resource&quot;: &quot;arn:aws:s3:::brdy-engineers/*&quot;
          }
      ]
  }
  </code></pre>
  <p><strong>Bucket CORS</strong></p>
  <pre><code>[
      {
          &quot;AllowedHeaders&quot;: [
              &quot;Authorization&quot;
          ],
          &quot;AllowedMethods&quot;: [
              &quot;GET&quot;
          ],
          &quot;AllowedOrigins&quot;: [
              &quot;*&quot;
          ],
          &quot;ExposeHeaders&quot;: [
              &quot;x-amz-server-side-encryption&quot;,
              &quot;x-amz-request-id&quot;,
              &quot;x-amz-id-2&quot;
          ],
          &quot;MaxAgeSeconds&quot;: 3000
      }
  ]
  </code></pre>
  <p><strong>Bucket Block all public access is off</strong></p>
  <p><em>I added current user to group policy that is</em></p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;s3:ListAllMyBuckets&quot;
              ],
              &quot;Resource&quot;: &quot;arn:aws:s3:::*&quot;
          },
          {
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;s3:ListBucket&quot;,
                  &quot;s3:GetBucketLocation&quot;,
                  &quot;s3:ListBucketMultipartUploads&quot;,
                  &quot;s3:ListBucketVersions&quot;
              ],
              &quot;Resource&quot;: &quot;arn:aws:s3:::brdy-engineers&quot;
          },
          {
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Action&quot;: [
                  &quot;s3:*Object*&quot;,
                  &quot;s3:ListMultipartUploadParts&quot;,
                  &quot;s3:AbortMultipartUpload&quot;
              ],
              &quot;Resource&quot;: &quot;arn:aws:s3:::brdy-engineers/*&quot;
          }
      ]
  }
  </code></pre>
  <p>What's the problem here, why i'm not able to access images on heroku app?</p>