VK Cloud logo

Managing objects in a bucket

Viewing the list of objects

  1. Go to the VK Cloud management console.
  2. Select the project that contains the bucket you need.
  3. Go to the Object Storage → Buckets section.
  4. Click the name of the bucket you need.

Downloading an object

  1. Go to the VK Cloud management console.

  2. Select the project that contains the bucket you need.

  3. Go to the Object Storage → Buckets section.

  4. Click the name of the bucket you need.

  5. Do one of the following for the object you need:

    • Select the object using the checkbox, then click the Download button.
    • Expand the object's menu and select Download file.

Granting access to an object

Objects uploaded to a bucket have the private access level by default, which means they can only be downloaded:

  • in the VK Cloud management console;
  • via CLI, API, SDK, and file managers, if there are access keys to the bucket or account.

You can change the object's access level to make it available to third-party users. Access levels correspond to standard ACLs. The following levels are available by default:

  • private — full access rights if you have access keys to the bucket or account; the object is not available to anyone else;
  • public-read — full access rights if you have the keys; other VK Cloud users and third-party users have read-only access to the object;
  • authenticated-read — full access rights if you have the keys; other VK Cloud users have read-only access to the object.

To change an object's access level:

This is a bulk operation: if needed, you can change access settings for several objects at once by selecting them with the checkboxes.

  1. Go to the VK Cloud management console.
  2. Select the project that contains the bucket you need.
  3. Go to the Object Storage → Buckets section.
  4. Click the name of the bucket you need.
  5. Expand the menu of the object you need and select File access.
  6. In the ACL settings field, select the access setting you need and click Save changes. If you select public-read or authenticated-read, a link for accessing the object will appear after you save the changes.
  7. Copy the link and close the access settings window.
  8. Send the link to users or place it on a third-party resource for direct access to the object.

Granting access to an object via a presigned URL

A presigned URL provides full access to an object for a third-party user, but is limited in time.

To generate a presigned URL:

  1. Install and configure AWS CLI if you haven't done so already.

  2. Open the console and run the command:

    aws s3 presign s3://<bucket_name>/<object_key> --endpoint-url <domain> --expires-in <validity_period>

    Here:

    • <object_key> — the object name and the path to it, including directories, if any.
    • <domain> — the VK Object Storage domain, which must match the account's region:
      • https://hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru — the Moscow region domain;
      • https://hb.kz-ast.vkcloud-storage.ru — the Kazakhstan region domain.
    • <validity_period> — the access validity period in seconds. If not specified, the link will be valid for 3600 seconds.

Copying an object

This guide is suitable for copying an object within a single bucket or between buckets of the same project.

  1. Install and configure AWS CLI if you haven't done so already.

  2. Open the console and run the command:

    aws s3 cp s3://<source_bucket>/<object_key> s3://<destination_bucket>/<object_key> --endpoint-url=<domain>

    Here:

    • <source_bucket> — the name of the bucket the object is copied from.
    • <destination_bucket> — the name of the bucket the object is copied to. If the names match, the object is copied within the same bucket.
    • <object_key> — the object name and the path to it, including directories, if any.
    • <domain> — the VK Object Storage domain, which must match the account's region:
      • https://hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru — the Moscow region domain;
      • https://hb.kz-ast.vkcloud-storage.ru — the Kazakhstan region domain.

Copying all objects of a bucket

  1. Install and configure AWS CLI if you haven't done so already.

  2. Open the console and run the command:

    aws s3 cp --recursive s3://<source_bucket> s3://<destination_bucket> --endpoint-url=<domain>

    Here:

    • <source_bucket> — the name of the bucket the object is copied from.
    • <destination_bucket> — the name of the bucket the object is copied to. If the names match, the object is copied within the same bucket.
    • <domain> — the VK Object Storage domain, which must match the account's region:
      • https://hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru — the Moscow region domain;
      • https://hb.kz-ast.vkcloud-storage.ru — the Kazakhstan region domain.

Deleting an object

This is a bulk operation: if needed, you can delete several objects at once by selecting them with the checkboxes.

To delete an object:

  1. Go to the VK Cloud management console.

  2. Select the project that contains the bucket you need.

  3. Go to the Object Storage → Buckets section.

  4. Click the name of the bucket you need. A page with information about the bucket will open on the Folders and files tab.

  5. Do one of the following for the object you need:

    • Select the object using the checkbox, then click the Delete button.
    • Expand the object's menu and select Delete file.
  6. Confirm the deletion.

Deleting parts of an uploaded object

If a multipart upload is not completed, the object is not created and cannot be used, but storage of the uploaded parts is charged. To avoid being charged, delete multipart uploads that will not be completed.

You can configure automatic deletion of incomplete uploads via the object lifecycle, or delete the upload manually.

To find out if you have incomplete multipart uploads:

  1. Go to the VK Cloud management console.
  2. Go to the Object Storage → Buckets section.
  3. Click the name of the bucket you need and go to the Multipart tab.

To delete incomplete uploads:

This is a bulk operation: if needed, you can delete several parts at once by selecting them with the checkboxes.

  1. Go to the VK Cloud management console.

  2. Go to the Object Storage → Buckets section.

  3. Click the name of the bucket you need and go to the Multipart tab.

  4. Do one of the following for the part you need:

    • Select the part using the checkbox, then click the Delete button above the table.
    • Select the part you want to delete and click the Delete icon on the right.
  5. Confirm the deletion.

Was this article helpful?