1

I am trying to use django-storages with heroku and S3. So I followed the tutorial from readthedocs. I installed everything as it says, I took my ID and Secret Key from Amazon console, and tried the following codes:

settings.py

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' AWS_ACCESS_KEY_ID = 'key_id' AWS_ACCESS_SECRET_KEY = 'secret_key' AWS_STORAGE_BUCKET_NAME = 'mybucket' from django.core.files.storage import default_storage >>> default_storage.__class__ <class 'django.core.files.storage.DefaultStorage'> 

I don't know if this is normal return value. I then did the following

default_storage.connection 

and I get the following exception

NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials 

Is there something wrong with my setup? The code is run locally. Want to test it locally first and then upload it to heroku

EDIT: I used console to manually connect to my s3 using id and secret key and worked fine. This is what I did

import boto boto.s3_connect(id, key) 

and worked. So what could be the problem?Django?

1 Answer 1

1

Found the Solution. Misspelled the key varible. just changed AWS_ACCESS_SECRET_KEY to AWS_SECRET_ACCESS_KEY and everything worked as it should

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.