Does AWS S3 API copy-object copies the retentions and tagging also to another bucket?

0

If I have an object in bucket bucket1 with retention and tagging enabled, does copy-object copies these properties also to another bucket say bucket2?

Saurav
asked 3 months ago540 views
2 Answers
1

Hello.

Tags will also be copied if you select "COPY" for "--tagging-directive" in the command options.
Object lock etc. can be configured using options such as "--object-lock-mode" and "--object-lock-retain-until-date".
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/copy-object.html

profile picture
EXPERT
answered 3 months ago
0

When you perform copy operation on objects from one bucket to another: 1/ It will create a copy of object with updated settings and a new last-modified date. 2/ To have the source tags in place at destination, you need to pass --tagging-directive parameter in the Copy API request. Check AWS CLI document for more information: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html

AWS
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions