0

In a Django project that uses django-storages and is configured with AWS credentials, I am getting the following error when uploading a file (i.e. saving a model that has a models.FileField field)

An error occurred (InvalidRequest) when calling the PutObject operation: S3 Transfer Acceleration is not configured on this bucket

I triple-checked the AWS credentials -- they even work on another computer with the same codebase, but not on my machine. (I provide the solution below)

1 Answer 1

0

The problem was happening because my ~/.aws/config global AWS/boto3 configuration file had:

[default]
s3 =
    use_accelerate_endpoint = true

This, in turn, was read by the boto3 library (see this page and search for "use_accelerate_endpoint") which then tried to use the accelerated endpoint on an S3 bucket which did not have an accelerated endpoint enabled.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.