VK Cloud logo
Updated at April 15, 2024   08:50 AM

SDK

To connect to the object storage using the SDK:

  1. Install the necessary tools or SDK:

  2. Create account and bucket if this has not been done before. Save the connection details:

    • Endpoint URL: https://hb.vkcs.cloud or https://hb.ru-msk.vkcs.cloud.
    • Access Key ID: the key ID received when creating the account.
    • Secret Key: the secret key received when creating the account.
    • Default region name: ru-msk.
  3. Configure the connection parameters to the object storage using one of the following methods:

    • Add the details to the ~/.aws/credentials configuration file.

      For a complete list of tools and SDKs that support this method, see official AWS documentation.

    • Specify the details in the environment variables:

      export AWS_ACCESS_KEY_ID=<account key ID>export AWS_SECRET_ACCESS_KEY=<account secret key>export AWS_DEFAULT_REGION=<default region name>
    • Add the details directly to the source code.

  4. Connect to the storage via the installed SDK.

    In the examples below, upon successful connection, a list of storage buckets for the Moscow region is displayed.