VK Cloud logo

Bucket Management

Viewing the list of buckets

  1. Go to the VK Cloud management console.

  2. Select a project.

  3. Go to the Object Storage → Buckets section. The list of buckets in the project will open.

  4. (Optional) Sort the list by bucket name using the arrows in the header of the corresponding column.

    • Ascending sort order: a–z / - / . / 0–9.
    • Descending sort order: 9–0 / . / - / z–a.

Domain binding

Binding a domain to a bucket will allow you to access the bucket objects through your domain, as well as use the bucket as a repository for your website.

  1. Register a domain with any domain name registrar if this has not been done previously. Only a third-level or higher domain can be bound, for example: mysite.mycompany.ru, my.site.mycompany.ru.

  2. Go to the VK Cloud management console.

  3. Select the project that contains the desired bucket.

  4. Go to the Object Storage → Buckets section.

  5. Go to the bucket settings in one of the following ways:

    • Click  for the desired bucket and select Настройки (Settings).
    • Click the name of the desired bucket, then on the bucket page click the button  .
  6. Go to the Домен (Domain) tab and click the button plus-icon Привязать домен (Bind domain).

  7. In the window that opens, copy the value for the CNAME record of the form <ИМЯ_БАКЕТА>.<ENDPOINT_ДОМЕН>. Example record: mybucket.hb.ru-msk.vkcloud-storage.ru.

  8. Go to the management console of your domain provider. Add any CNAME record for your domain, and as the record value, add the copied text.

  9. Wait for the changes to take effect. This usually takes 15–20 minutes.

  10. Return to the VK Cloud management console. In the Домен (Domain) field, enter the name of your domain.

After binding, the bucket will be available via a link of the form http://<ИМЯ_БАКЕТА>.<ИМЯ_ДОМЕНА>, for example http://mybucket.mysite.mycompany.ru.

Using CDN

  1. Go to the VK Cloud management console.

  2. Select the project that contains the bucket you need. If you don't have a bucket yet, create one.

  3. Go to the Object Storage → Buckets section.

  4. Go to the bucket settings using one of the following methods:

    • Click  for the bucket you need and select Settings.
    • Click the name of the bucket you need, then on the bucket page click the  button.
  5. Go to the CDN tab.

  6. Select the Use CDN for this bucket option.

    For the bucket to be able to act as a source for a CDN resource, select the public-read ACL when adding objects to this bucket.

  7. Set up one or more custom domains.

    1. Specify the domains to be used for the CDN. When these domains are accessed for content, the content will be delivered via the CDN.

      You can specify one domain in the Custom domain field. Use the fully qualified domain name (FQDN). Don't add the root domain name to it: cdn.example.com is valid, but cdn.example.com. is not.

      To specify multiple domains, click plus-icon Add domain. You can remove domains you don't need by clicking the trash-icon icon next to them.

    2. Save the service domain name that you need to specify in the CNAME record for the domains you specified.

      A hint with this information is provided below.

    3. Add a CNAME record for each custom domain in your DNS zone settings. Use the service domain name as the alias.

      If you use the DNS service from VK Cloud, follow the instructions.

      You can also add CNAME records after the CDN resource is created.

  8. Select the cache TTL you need from the drop-down list.

    This parameter allows you to cache responses with the following HTTP statuses for the specified time: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.

    Responses with other statuses are not cached.

    (Optional) You can disable caching completely by selecting Don't cache.

  9. Click Save changes.

  10. Wait for the origin group and the CDN resource for the bucket to be created. The created objects will be available in the CDN section of the management console.

  11. Set the Host header in the format <BUCKET_NAME>.<SERVICE_DOMAIN>.

    Where:

    • <BUCKET_NAME> is the name of the VK Object Storage bucket containing the content you need.
    • <SERVICE_DOMAIN> is the VK Object Storage service domain, which must match the region of your account:
      • hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru for the Moscow region;
      • hb.kz-ast.vkcloud-storage.ru for the Kazakhstan region.

Synchronizing a local directory with a bucket

VK Object Storage allows you to synchronize bucket objects and files of a local directory. During synchronization, VK Object Storage checks the presence of the file or object, their size, and the date of the last modification. The comparison occurs at the moment the command or request is executed. Depending on the command or request, the contents of either the bucket or the local directory are updated.

  1. Install and configure AWS CLI if it is not already installed.

  2. In the console, go to the local directory that needs to be synchronized with the bucket.

  3. Run the command in the console:

    • To update the local directory to match the bucket:

      aws s3 sync s3://<ИМЯ_БАКЕТА> . --endpoint-url <ENDPOINT_URL>
    • To update the bucket to match the local directory:

      aws s3 sync . s3://<ИМЯ_БАКЕТА> --endpoint-url <ENDPOINT_URL>
      • <ENDPOINT_URL> — must match the account region:

        • https://hb.vkcloud-storage.ru or https://hb.ru-msk.vkcloud-storage.ru — for the Moscow region;
        • https://hb.kz-ast.vkcloud-storage.ru — for the Kazakhstan region.

Deleting a bucket

This is a group operation: if necessary, you can delete several buckets at once by selecting them using checkboxes.

  1. Go to the VK Cloud management console.

  2. Select the project that contains the desired bucket.

  3. Go to the Object Storage → Buckets section.

  4. Delete the objects from the bucket you want to delete if this has not been done previously.

  5. Delete the bucket in one of the following ways:

    • Click  for the desired bucket and select Удалить (Delete).
    • Select the bucket using the checkbox, then click the button trash-icon Удалить (Delete).
  6. Confirm the deletion.

Was this article helpful?