title: How to make AWS credentials accessible to boto in django environment?
body: <p>I'm unable to create an S3 connection in my django environment via django-s3-storages middleware (I'm getting a 403 response from S3).</p>
  
  <p>Boto doesn't seem to be able to pick up the environment settings, and I suspect this is the cause (the traceback isn't helping much). As a diagnosis in <code>manage.py shell</code>:</p>
  
  <pre><code>import boto
  boto.connect_s3()
  &gt;&gt;&gt; boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
  
  from django.conf import settings
  boto.connect_s3(settings.AWS_ACCESS_KEY_ID, settings.AWS_SECRET_ACCESS_KEY)
  &gt;&gt;&gt; S3Connection:s3.amazonaws.com
  </code></pre>
  
  <p><a href="https://github.com/etianen/django-s3-storage" rel="nofollow noreferrer">The docs</a> (and other posts) indicate that these settings should work:</p>
  
  <pre><code>MEDIAFILES_LOCATION = 'media'
  AWS_S3_CUSTOM_DOMAIN = 'my-bucket.s3-website-eu-west-1.amazonaws.com'
  AWS_S3_HOST = 's3-website-eu-west-1.amazonaws.com'
  MEDIA_URL = "https://%s/%s/" % (AWS_S3_CUSTOM_DOMAIN, MEDIAFILES_LOCATION)
  DEFAULT_FILE_STORAGE = 'django_s3_storage.storage.StaticS3Storage'
  
  #S3 settings from https://github.com/etianen/django-s3-storage
  AWS_ACCESS_KEY_ID = "xxx"
  AWS_SECRET_ACCESS_KEY = "yyy"
  AWS_S3_BUCKET_NAME = "my-bucket"
  AWS_S3_CALLING_FORMAT = "boto.s3.connection.OrdinaryCallingFormat"
  
  # Make user uploaded files public
  AWS_S3_BUCKET_AUTH = False
  AWS_S3_MAX_AGE_SECONDS = 60*60*24*365 # 1 year
  AWS_S3_GZIP = True
  </code></pre>
  
  <p>Why isn't boto able to connect?</p>