0

Rename is not just renaming a folder in amazon in turn it does the copy and delete which involves PUT request and cost is involved and the might be slow when there are huge files with huge size exist in the folder (http://gerardvivancos.com/2016/04/12/Single-and-Bulk-Renaming-of-Objects-in-Amazon-S3/)

I come across the following page (http://gerardvivancos.com/2016/04/12/Single-and-Bulk-Renaming-of-Objects-in-Amazon-S3/) which talks about renaming via script.

  1. Can we execute the similar script via Amazon SDK java API?
  2. Does still it does copy and delete internally or just changing the paths alone?

Thanks.

Kathiresa
  • 421
  • 2
  • 6
  • 15

1 Answers1

0

That script is just issuing aws s3 mv commands in a loop. You can issue S3 move commands via the AWS Java SDK.

It is still copying and deleting internally.

Mark B
  • 183,023
  • 24
  • 297
  • 295
  • Thanks a lot, Mark for clarifying this. Is there is any way to just rename the keys i.e rename the values instead of copying and deleting. Because renaming a bit expensive as it is involves cost if the folder has huge files and sub-folders where of huge size – Kathiresa Sep 13 '16 at 13:17
  • @Kathiresa your question is not a new one. Read this: http://stackoverflow.com/questions/21184720/how-to-rename-files-and-folder-in-amazon-s3 – Mark B Sep 13 '16 at 13:36