Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for copy-props option #29

Open
elliott-alt opened this issue Apr 5, 2021 · 3 comments
Open

Support for copy-props option #29

elliott-alt opened this issue Apr 5, 2021 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@elliott-alt
Copy link

If you have only GetObject permission for the source bucket contents then the s3p cp command fails with this error because it's trying to copy object tags:

An error occurred (AccessDenied) when calling the GetObjectTagging operation: Access Denied

The aws cli has an option to avoid this problem using aws s3 cp --copy-props none. It would be nice to implement it in the same way here. Reference: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html

As an example, here is a public bucket which allows GetObject but blocks getting object tags.
s3://download.opencontent.netflix.com

@shanebdavis
Copy link
Member

Interesting! And thanks for the example bucket to test against. I'll look into it.

@shanebdavis shanebdavis added the bug Something isn't working label Jul 14, 2021
@shanebdavis
Copy link
Member

I'm trying to figure out what the equivalent props are for the copyObject command in the SDK. I think it has to do with the metadata, metadataDirective, tagging and taggingDirective properties.

Do you know of any good doc for how --copy-props none translates into those four properties? I can't find any...

@shanebdavis shanebdavis added question Further information is requested enhancement New feature or request and removed bug Something isn't working labels Jul 23, 2021
@hmate9
Copy link

hmate9 commented Apr 3, 2024

This is still an issue.
I made a local edit for myself: hmate9@9346b77

I could not find anything in the API documentation for no-props for the aws-sdk so instead I just use a try-catch and on error revert back to cli option with the --no-props flag. This is fine for my usecase as most files are copiable normally.

Just leaving it here in case someone needs it as inspiration to make a proper, clean pull request for this issue. I am unlikely to have the time anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants