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)
The problem was happening because my
~/.aws/configglobal AWS/boto3 configuration file had: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.