How to rename files or objects in Amazon S3? - Big Data In Real World

How to rename files or objects in Amazon S3?

How to delete duplicate data from the Hive table?
March 7, 2023
What is a pipeline and how to create a pipeline in Elasticsearch?
March 13, 2023
How to delete duplicate data from the Hive table?
March 7, 2023
What is a pipeline and how to create a pipeline in Elasticsearch?
March 13, 2023

Amazon S3 is not a filesystem so there is no rename command to rename objects or files. However this is a well known workaround.

Workaround

Issue a move command to rename directories or files

aws s3 --recursive mv s3://hirw-kickstarter/Output s3://hirw-kickstarter/Output2
aws s3 mv s3://hirw-kickstarter/Output2/_SUCCESS s3://hirw-kickstarter/Output2/_SUCCESS2

How come we see the rename option in AWS console?

Rename option does the same set of operations as listed above.

Although, you can get what you want with the above commands to rename objects. It is important to note the files are moved during this and it will incur cost to move the objects around.

Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

Comments are closed.

How to rename files or objects in Amazon S3?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X