S3 Same Region Replication configuration issue

93 Views Asked by At

I am using S3 SRR to copy files from source bucket to destination bucket. I was able to successfully set it up. I need to add below two features now in this replication:

  1. delete the file from source bucket once it is replicated in destination bucket.
  2. change the file name in destination bucket. For ex: file name in source bucket is test_file.txt, I need to make it test_file_30Jan2023 as part of replication process in Destination bucket.

can someone please advise where I can find these options?

1

There are 1 best solutions below

0
On

Both same-region-replication and cross-region-replication can only replicate files to another bucket. There is no functionality for deleting or renaming files.

Depending on your use case, you may be able to use lifecycle rules to delete your objects. However for more complex manipulations you will have to write custom logic, for example using S3 events/EventBridge and AWS Lambda.