From 49a3c6c36d45533c157577f1a6d3b101576ad5f8 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Wed, 7 Jan 2026 11:59:34 -0500 Subject: [PATCH] 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. --- CHANGES.txt | 2 ++ ctlsettings/production.py | 3 --- ctlsettings/staging.py | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9d60a8e..950b154 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,8 @@ ==================== * Removed dependency on django-stagingcontext * Updated S3Storage class locations for django-storages +* django-storages: remove public-read ACL. ACLs are deprecated in + favor of bucket policies. 0.4.5 (2025-11-06) ==================== diff --git a/ctlsettings/production.py b/ctlsettings/production.py index b77e7e7..1052c2e 100644 --- a/ctlsettings/production.py +++ b/ctlsettings/production.py @@ -39,9 +39,6 @@ def common(**kwargs): if s3static: # serve static files off S3 AWS_STORAGE_BUCKET_NAME = s3prefix + "-" + project + "-static-prod" - AWS_S3_OBJECT_PARAMETERS = { - 'ACL': 'public-read', - } STORAGES = { 'default': { 'BACKEND': 'ctlsettings.storages.UploadsStorage', diff --git a/ctlsettings/staging.py b/ctlsettings/staging.py index fd2c5f0..4a17621 100644 --- a/ctlsettings/staging.py +++ b/ctlsettings/staging.py @@ -31,9 +31,6 @@ def common(**kwargs): if s3static: # serve static files off S3 AWS_STORAGE_BUCKET_NAME = s3prefix + "-" + project + "-static-stage" - AWS_S3_OBJECT_PARAMETERS = { - 'ACL': 'public-read', - } STORAGES = { 'default': { 'BACKEND': 'ctlsettings.storages.UploadsStorage',