Open jmurty opened 7 years ago
django-storages is pegged to < 1.6 in commit bdacba6c
They have released 1.6.3 which reverts the change to default value, but 1.7 will make the change again. The docs aren't clear which additional setting we need to provide to specify the correct endpoint, but I guess it might be AWS_S3_REGION_NAME
. So now we might need bucket name, access key ID, secret key, and region name settings.
We have pinned django-storages to < 1.6 for now because recent updates in versions 1.6 (up to and including 1.6.2 at least) generate incorrect S3 URL formats which break our assets lookups.
The issue is reported upstream in https://github.com/jschneier/django-storages/issues/343 In that ticket, it sounds like an upcoming 1.6.3 version will fix our immediate issue.
However, deeper down, the problem has been triggered by Amazon's update to "version 4" signatures for S3, which is very different from the legacy signing approach. Version 4 request signing is the only kind that works for new(er) S3 regions, since the legacy version is deprecated.
So ultimately we should:
AWS_S3_SIGNATURE_VERSION='s3v4'
and theAWS_S3_HOST
setting as documented in http://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html