Get a list of bucket objects
-
In the management console
, select Object Storage from the list of services and go to the bucket you need. -
In the left-hand panel, select
Objects. You will see a list of objects and folders.To view the list of objects in the folder, click it.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the CLI command to get a list of bucket objects:
yc storage s3api list-objects --help -
Get a list of buckets in the default folder:
yc storage bucket listResult:
+------------------+----------------------+-------------+-----------------------+---------------------+ | NAME | FOLDER ID | MAX SIZE | DEFAULT STORAGE CLASS | CREATED AT | +------------------+----------------------+-------------+-----------------------+---------------------+ | first-bucket | b1gmit33ngp6******** | 53687091200 | STANDARD | 2022-12-16 13:58:18 | +------------------+----------------------+-------------+-----------------------+---------------------+ -
Run this command:
yc storage s3api list-objects \ --bucket <bucket_name> \ --prefix <object_key_prefix>Where:
--bucket: Bucket name.--prefix: Folder within the bucket. This is an optional parameter.
Result:
contents: - key: my-folder/ last_modified: "2025-04-05T09:21:30.870Z" etag: '"d41d8cd98f00b204e9800998********"' owner: id: aje9k8luj4qf******** display_name: aje9k8luj4qf******** storage_class: STANDARD - key: my-folder/clouds.jpg last_modified: "2025-04-05T09:22:00.542Z" etag: '"e48cfc54e831ee0b334a00f9********"' size: "455747" owner: id: aje9k8luj4qf******** display_name: aje9k8luj4qf******** storage_class: STANDARD - key: my-folder/nice_text.txt last_modified: "2025-04-05T09:21:40.023Z" etag: '"379e8ff6a0f89b09534753e3********"' size: "64154" owner: id: aje9k8luj4qf******** display_name: aje9k8luj4qf******** storage_class: STANDARD name: first-bucket prefix: my-folder/ max_keys: "1000" key_count: "3" request_id: dc073b86********
-
If you do not have the AWS CLI yet, install and configure it.
-
To get a list of objects in a bucket, run the following command:
aws s3api list-objects \ --endpoint-url=https://storage.yandexcloud.net \ --bucket <bucket_name> \ --prefix <object_key_prefix>Where:
--endpoint-url: Object Storage endpoint.--bucket: Bucket name.--prefix: Folder within the bucket. This is an optional parameter.
Result:
{ "Contents": [ { "Key": "my-folder/", "LastModified": "2025-04-05T09:21:30.870000+00:00", "ETag": "\"d41d8cd98f00b204e9800998********\"", "Size": 0, "StorageClass": "STANDARD", "Owner": { "DisplayName": "aje9k8luj4qf********", "ID": "aje9k8luj4qf********" } }, { "Key": "my-folder/clouds.jpg", "LastModified": "2025-04-05T09:22:00.542000+00:00", "ETag": "\"e48cfc54e831ee0b334a00f9********\"", "Size": 455747, "StorageClass": "STANDARD", "Owner": { "DisplayName": "aje9k8luj4qf********", "ID": "aje9k8luj4qf********" } }, { "Key": "my-folder/nice_text.txt", "LastModified": "2025-04-05T09:21:40.023000+00:00", "ETag": "\"379e8ff6a0f89b09534753e3********\"", "Size": 64154, "StorageClass": "STANDARD", "Owner": { "DisplayName": "aje9k8luj4qf********", "ID": "aje9k8luj4qf********" } }, ], "RequestCharged": null }
To get a list of objects in the bucket, use the listObjects S3 API method.