Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS S3 replicate with destination prefix

Is there a way to replicate from one S3 source bucket to destination bucket with prefix in the destination bucket? I see the option to filter the prefix in the source bucket, but not the destination. Basically, trying to do what Sync/cp would do.

e.g.

aws s3 sync s3://<source-bucket>/prefix1/ s3://<destination-bucket>/prefix2/
like image 902
big11mac Avatar asked Oct 21 '25 00:10

big11mac


1 Answers

I came across your question after researching this myself today. As John commented, no, it's not possible.

From the ReplicationRule API documentation page, you can see that you have to specify a Destination. From the Destination API page, you can see that you are only able to specify a bucket ARN, and cannot specify a destination prefix.

like image 196
Jordan Avatar answered Oct 23 '25 15:10

Jordan