Skip to main content
In Object Storage, you work with files and folders called objects and place them in containers called buckets. This guide will help you manage objects in buckets.

Prerequisites

To manage buckets, you need to install and configure AWS CLI. It provides simple commands for object management, like aws s3 cp to move objects between a bucket and a local computer and aws s3 rm to delete them. For more details on installing and configuring, see How to get started with Object Storage: Create your first bucket and the guide on the AWS CLI.

Object naming requirements

Each Object Storage object has a key — object ID in a string format. This key can contain prefixes — they act similar to directories, organizing objects into groups. To avoid issues with your objects, follow these requirements:
  • Object keys can be up to 1024 bytes long, case sensitive.
  • Use UTF-8 alphanumeric characters, slashes (/) and certain special characters.
For more information on character usage and which characters to avoid, see the AWS object naming guidelines.

How to list objects

This command will show you the list of all the prefixes and all the first-level objects on your Object Storage bucket:
aws s3 ls s3://<bucket_name>/[<prefix_for_object_keys>]
You can find more information on the ls command in the AWS CLI reference.

How to rename an object

You can rename an object in your Object Storage bucket using the following manual sequence:
  1. Copy the object in question with a new name. You can also update an object’s prefix:
    aws s3 cp \
        s3://<bucket_name>/[<prefix_for_old_object_key>] \ # prefix and name of the object to rename 
        s3://<bucket_name>/[<prefix_for_new_object_key>]   # desired prefix and name of the object
    
  2. Remove the old copy of the renamed object:
    aws s3 rm s3://<bucket_name>/[<prefix_for_old_object_key>]
    

How to delete an object

You can delete one or more objects as follows:
This command will remove the object with a specified key:
aws s3 rm s3://<bucket_name>/<object_key>
You can find more information on the rm command in the AWS CLI reference. When an object is deleted from a bucket in Object Storage, it becomes immediately inaccessible and cannot be restored. The actual object data is then physically deleted from Nebius AI Cloud servers within 4 days.

See also