VAAA
VAAA

Reputation: 15049

How can I change a file name on Amazon S3?

I have an application that uploads files to Amazon S3 but right now I have the requirement to add a new feature to rename a file in an S3 Bucket.

I would like to know how to rename a file that is already uploaded to Amazon S3?

Upvotes: 1

Views: 3161

Answers (2)

Alexander I.
Alexander I.

Reputation: 2714

You can implement renaming using two operations:

  1. CopyObjectRequest

  2. DeleteObjectRequest

Also please review this link for more details (and code examples).

Upvotes: 2

Yahya Younes
Yahya Younes

Reputation: 710

There is no rename for amazon s3 object but as work around you can Copy the object with a new name then Delete the old one.

Upvotes: 0

Related Questions