Skip to content

Commit

Permalink
Do not set ACL because ACLs are deprecated
Browse files Browse the repository at this point in the history
We are having challenges where the copy is failing, we believe because
it is attempting to set a public-read ACL but we have set the flags
on the bucket to prohibit public access.
  • Loading branch information
dragon-dxw committed Nov 7, 2023
1 parent daa236e commit a9aeab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ds-caselaw-ingester/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def update_published_documents(uri, s3_client):

if "parser.log" not in key and not str(key).endswith(".tar.gz"):
source = {"Bucket": private_bucket, "Key": key}
extra_args = {"ACL": "public-read"}
extra_args = {}
s3_client.copy(source, public_bucket, key, extra_args)


Expand Down
4 changes: 2 additions & 2 deletions ds-caselaw-ingester/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,13 @@ def test_update_published_documents(self):
{"Bucket": "private-bucket", "Key": "file1.ext"},
"public-bucket",
"file1.ext",
{"ACL": "public-read"},
{},
),
call(
{"Bucket": "private-bucket", "Key": "file2.ext"},
"public-bucket",
"file2.ext",
{"ACL": "public-read"},
{},
),
]
lambda_function.update_published_documents("uri", s3_client)
Expand Down

0 comments on commit a9aeab8

Please sign in to comment.