Skip to content

Conversation

@anteverse
Copy link
Contributor


In providers.amazon.aws.hooks.s3.S3Hook, it is currently not possible to run the copy_object method without an ACL policy.

As mentioned in the doc, the copy_object method will default to the canned ACL "private". Despite the capability to not write ACL in load/upload methods, It is not possible to copy without an ACL when implemented as such.

This change adds the capability to not write ACL on the destination object.
Since many users may rely on the default value being private, I suggest we used an explicit value that would remove the ACL.
The explicit value suggested: "no-acl". This value is not a Canned ACL so we are not conflicting with any provider value.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Jul 1, 2024
@anteverse
Copy link
Contributor Author

@eladkal @o-nikolas I've tried to keep it as restrictive as possible and make sure that anybody who relies on the default value keeps it. Anyway let me know if you know any other places where it could have side effects. Thanks a lot!

@potiuk potiuk merged commit 8e04ef0 into apache:main Jul 2, 2024
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
* Be able to remove ACL in S3 hook's copy_object

* Add default test as well

* Update s3.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants