Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Object Storage
    • All tutorials
      • Uploading an object
      • Multipart upload of an object
      • Get a list of bucket objects
      • Getting information about an object
      • Downloading an object
      • Restoring an object's version
      • Renaming and moving objects
      • Copying objects
      • Getting a public link to an object
      • Configuring an object lock
      • Deleting an object
      • Deleting all objects
      • Deleting a partially uploaded object
      • Editing an object's ACL
      • Managing object labels
      • Managing object custom metadata
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Renaming
  • Moving
  1. Step-by-step tutorials
  2. Objects
  3. Renaming and moving objects

Renaming and moving an object

Written by
Yandex Cloud
Improved by
Tania L.
Updated at March 19, 2025
  • Renaming
  • Moving

To work with objects in an encrypted bucket, a user or service account must have the following roles for the encryption key in addition to the storage.configurer role:

  • kms.keys.encrypter: To read the key, encrypt and upload objects.
  • kms.keys.decrypter: To read the key, decrypt and download objects.
  • kms.keys.encrypterDecrypter: This role includes the kms.keys.encrypter and kms.keys.decrypter permissions.

For more information, see Key Management Service service roles.

RenamingRenaming

AWS CLI
  1. If you do not have the AWS CLI yet, install and configure it.

  2. To rename an object, run this command:

    aws --endpoint-url=https://storage.yandexcloud.net/ \
      s3 mv s3://<bucket_name>/<object_key> s3://<bucket_name>/<new_object_key>
    

    Where:

    • --endpoint-url: Object Storage endpoint.
    • s3 mv: Command to rename or move an object. To rename an object, in the first part of the command, provide the bucket name and the current key of the object you want to rename, and in the second part, the bucket name and the new object key.

    Result:

    move: s3://<bucket_name>/<object_key> to s3://<bucket_name>/<new_object_key>
    

For more information about the aws s3 mv command, see this article in the AWS CLI command reference.

MovingMoving

AWS CLI
  1. If you do not have the AWS CLI yet, install and configure it.

  2. To move an object, e.g., from one bucket to another, run this command:

    aws --endpoint-url=https://storage.yandexcloud.net/ \
      s3 mv s3://<source_bucket_name>/<object_key> s3://<target_bucket_name>/<object_key>
    

    Where:

    • --endpoint-url: Object Storage endpoint.
    • s3 mv: Command to rename or move an object. To move an object, in the first part of the command, provide the source bucket name and the key of the object you want to move, and in the second part, the target bucket name and the object key.

    Result:

    move: s3://<source_bucket_name>/<object_key> to s3://<target_bucket_name>/<object_key>
    

For more information about the aws s3 mv command, see this article in the AWS CLI command reference.

In Object Storage, folders are simulated using key prefixes. To move an object from one folder to another, rename its key prefix.

You can also use supported tools, such as a file browser, to rename and move objects.

Was the article helpful?

Previous
Restoring an object's version
Next
Copying objects
Yandex project
© 2025 Yandex.Cloud LLC