Skip to content

Commit 49a3c6c

Browse files
committed
Remove django-storages ACL config
I'm seeing this error in my ECS application when collectstatic runs: > botocore.exceptions.ClientError: An error occurred (AccessControlListNotSupported) > when calling the PutObject operation: The bucket does not allow ACLs It seems that ACLs are deprecated and the current way to do this in AWS is via a bucket policy or using cloudfront.
1 parent 6d23fd9 commit 49a3c6c

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎CHANGES.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
====================
33
* Removed dependency on django-stagingcontext
44
* Updated S3Storage class locations for django-storages
5+
* django-storages: remove public-read ACL. ACLs are deprecated in
6+
favor of bucket policies.
57

68
0.4.5 (2025-11-06)
79
====================

‎ctlsettings/production.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ def common(**kwargs):
3939
if s3static:
4040
# serve static files off S3
4141
AWS_STORAGE_BUCKET_NAME = s3prefix + "-" + project + "-static-prod"
42-
AWS_S3_OBJECT_PARAMETERS = {
43-
'ACL': 'public-read',
44-
}
4542
STORAGES = {
4643
'default': {
4744
'BACKEND': 'ctlsettings.storages.UploadsStorage',

‎ctlsettings/staging.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ def common(**kwargs):
3131
if s3static:
3232
# serve static files off S3
3333
AWS_STORAGE_BUCKET_NAME = s3prefix + "-" + project + "-static-stage"
34-
AWS_S3_OBJECT_PARAMETERS = {
35-
'ACL': 'public-read',
36-
}
3734
STORAGES = {
3835
'default': {
3936
'BACKEND': 'ctlsettings.storages.UploadsStorage',

0 commit comments

Comments
 (0)