Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for YDB
  • Getting started
  • Access management
  • Monitoring metrics
  • Audit Trails events
  • FAQ
  • Public materials

In this article:

  • Getting started
  • Create a database
  • Create a serverless database
  • Create a database on dedicated servers
  • Query your database
  • What's next

Getting started with Managed Service for YDB

Written by
Yandex Cloud
Improved by
Updated at April 24, 2026
  • Getting started
  • Create a database
    • Create a serverless database
    • Create a database on dedicated servers
  • Query your database
  • What's next

In this tutorial, you will create a YDB database in Yandex Cloud and run a simple query against it using the Yandex Cloud management console or command line tools.

You can also work with a Yandex Managed Service for YDB database through:

  • YDB SDK
  • YDB CLI
  • AWS SDK
  • AWS CLI

Getting startedGetting started

  1. Navigate to the management console and log in to Yandex Cloud or sign up if not signed up yet.

  2. If you do not have a folder yet, create one:

    1. In the management console, in the top panel, click or and select the cloud.

    2. To the right of the cloud name, click .

    3. Select Create folder.

      create-folder1

    4. Give your folder a name. The naming requirements are as follows:

      • Length: between 3 and 63 characters.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    5. Optionally, specify the description for your folder.

    6. Select Create a default network. This will create a network with subnets in each availability zone. Within this network, you will also have a default security group, within which all network traffic will be allowed.

    7. Click Create.

      create-folder2

Create a databaseCreate a database

You can create a database in a serverless configuration or with dedicated servers. For more information about differences between configurations, see Serverless and dedicated modes. You cannot change the database type once you create it.

Note

For the Amazon DynamoDB compatibility mode, use a serverless database configuration.

Create a serverless databaseCreate a serverless database

Management console
Yandex Cloud CLI
  1. In the management console, select the folder for your database.

  2. Go to Managed Service for YDB.

  3. Click Create a database.

  4. Enter a Name for your database. The naming requirements are as follows:

    • Length: between 3 and 63 characters.
    • It can only contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  5. Under Database type, select Serverless.

    You can leave the default parameters for your database and update them later. For more information about database parameters, see Creating a serverless database.

  6. Click Create a database.

Wait for the database to start. While being created, your database will have the Provisioning status. Once it is ready for use, its status will change to Running.

  1. If you do not have the Yandex Cloud CLI yet, install and initialize it.

  2. Create a database:

    yc ydb database create <DB_name> --serverless
    

    Where <DB_name> is the name of your database.

    Result:

    done (6s)
    id: etn95g8jk8g0********
    folder_id: b1g7gvsi89m3********
    created_at: "2022-05-30T07:26:44Z"
    name: test
    status: PROVISIONING
    endpoint: grpcs://ydb.serverless.yandexcloud.net:2135/?database=/ru-central1/b1gia87mbaom********/etn95g8jk8g0********
    serverless_database:
      storage_size_limit: "53687091200"
    location_id: ru-central1
    backup_config:
      backup_settings:
      - name: daily
        backup_schedule:
          daily_backup_schedule:
            execute_time:
              hours: 17
        backup_time_to_live: 172800s
        type: SYSTEM
    document_api_endpoint: https://docapi.serverless.yandexcloud.net/ru-central1/b1gia87mbaom********/etn95g8jk8g0********
    monitoring_config: {}
    

    This will create a database with the default parameters. You can update its parameters later on. For more information about database parameters, see Creating a serverless database.

  3. Check the status of the new database:

    yc ydb database get <DB_name>
    

    Where <DB_name> is the name of your new database.

    While being created, your database will have the PROVISIONING status. Once it is ready for use, its status will change to RUNNING.

Create a database on dedicated serversCreate a database on dedicated servers

Management console
Yandex Cloud CLI
  1. In the management console, select the folder for your database.

  2. Go to Managed Service for YDB.

  3. Click Create a database.

  4. Enter a Name for your database. The naming requirements are as follows:

    • Length: between 3 and 63 characters.
    • It can only contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  5. Under Database type, select Dedicated.

  6. Under Computing resources, select the type and amount of computing resources.

  7. Under Storage groups, select the disk type and number of storage groups that determines the total amount of storage.

  8. Under Network, configure the network:

    1. Optionally, in the Public IP addresses field, select Assign if you plan to query the database both from the Yandex Cloud network and the internet.

      Warning

      For Managed Service for YDB databases with external IP addresses, the outgoing internet traffic consumption is calculated based on the current pricing policy.

      Use grants to offset the charges for outgoing internet traffic generated by Managed Service for YDB usage.

    2. Select an existing network from the Cloud network list or create a new one:

      1. Click Create.
      2. In the window that opens, enter a Name for the new network.
      3. Optionally, select Create subnets. Subnets in each availability zone will be created automatically.
      4. Click Create network.
    3. Under Subnets, select a subnet or create a new one for each availability zone:

      1. Click Create.
      2. In the window that opens, enter a Name for the new subnet.
      3. Optionally, enter a Description for the subnet.
      4. Select the availability zone from the Availability zone list.
      5. Set the subnet address in CIDR format.
      6. Click Create subnet.

    You cannot change the settings of the Network section after the database is created.

  9. Click Create a database.

    Wait for the database to start. While being created, your database will have the Provisioning status. Once it is ready for use, its status will change to Running.

  1. If you do not have the Yandex Cloud CLI yet, install and initialize it.

  2. Create a cloud network and subnets for each availability zone, if needed.

  3. Create a database:

    yc ydb database create <DB_name> \
      --dedicated \
      --resource-preset <configuration> \
      --storage type=<storage_type>,groups=<number_of_storage_groups> \
      --public-ip \
      --network-name default\
      --async
    

    Where:

    • --resource-preset STR: Configuration of the node computing resources. You can find the valid values in the Configuration name column of the table in Database on dedicated resources.
    • --storage STR: Storage type and number of storage groups in type=<storage_type>,groups=<number_of_storage_groups> format. For the ssd type, a single storage group can store up to 100 GB of data.
    • --public-ip: Public IP address assignment flag. Without it, you will not be able to connect to your database from the internet.
    • --network-name STR: Name of the cloud network to create the database in. You can specify the default network.
    • --async: Asynchronous database creation flag.

    For more information about database parameters, see Creating a serverless database.

    Result:

    done (7m18s)
    id: etnk1u65e4sh********
    folder_id: b1g7gvsi89m3********
    created_at: "2022-05-31T10:10:12Z"
    name: test-ded
    status: PROVISIONING
    endpoint: grpcs://lb.etnk1u65e4shtgj338va.ydb.mdb.yandexcloud.net:2135/?database=/ru-central1/b1gia87mbaom********/etnk1u65e4sh********
    resource_preset_id: medium
    storage_config:
      storage_options:
      - storage_type_id: ssd
        group_count: "1"
      storage_size_limit: "107374182400"
    scale_policy:
      fixed_scale:
        size: "1"
    network_id: enpqkm0od2bu********
    subnet_ids:
    - b0cmespgm8o3********
    - e2lif378n1pg********
    - e9b72lv142k4********
    dedicated_database:
      resource_preset_id: medium
      storage_config:
        storage_options:
        - storage_type_id: ssd
          group_count: "1"
        storage_size_limit: "107374182400"
      scale_policy:
        fixed_scale:
          size: "1"
      network_id: enpqkm0od2bu********
      subnet_ids:
      - b0cmespgm8o3********
      - e2lif378n1pg********
      - e9b72lv142k4********
      assign_public_ips: true
    assign_public_ips: true
    location_id: ru-central1
    backup_config:
      backup_settings:
      - name: daily
        backup_schedule:
          daily_backup_schedule:
            execute_time:
              hours: 17
        backup_time_to_live: 172800s
        type: SYSTEM
    monitoring_config: {}
    
  4. Check the status of the new database:

    yc ydb database get <DB_name>
    

    Where <DB_name> is the name of your new database.

    While being created, your database will have the PROVISIONING status. Once it is ready for use, its status will change to RUNNING.

Query your databaseQuery your database

Management console
YDB CLI
  1. In the management console, select the folder with your database.

  2. Go to Managed Service for YDB.

  3. Select the database you created.

  4. Navigate to the Navigation tab.

  5. Click New SQL query and enter the query text.

    SELECT 1;
    
  6. Click Run.

    Check the query result below:

    # column0
    0 1
    
  1. If you do not have the Yandex Cloud CLI yet, install and initialize it.

  2. To manage your databases from the command line, install the YDB CLI.

  3. To authenticate the YDB CLI in Yandex Cloud, get an IAM token and export it to the environment variable:

    export IAM_TOKEN=`yc iam create-token`
    
  4. Get the database endpoint and path:

    yc ydb database get ydb-prod
    

    Result:

    ...
    endpoint: grpcs://ydb.serverless.yandexcloud.net:2135/?database=/ru-central1/b1gia87mbaom********/etnudu2n9ri3********
    ...
    

    Here, a part of the grpcs://ydb.serverless.yandexcloud.net:2135 string contains the endpoint, while /ru-central1/b1gia87mbaom********/etnudu2n9ri3******** specifies the database path.

  5. Query your database using the database endpoint and path:

    ydb \
      --endpoint grpcs://ydb.serverless.yandexcloud.net:2135 \
      --database /ru-central1/b1gia87mbaom********/etnudu2n9ri3******** \
      yql -s "SELECT 1;"
    

    Result:

    ┌─────────┐
    | column0 |
    ├─────────┤
    | 1       |
    └─────────┘
    

What's nextWhat's next

  • Learn more about working with databases.
  • Read about the service concepts.
  • Learn more about the YQL.

Was the article helpful?

Next
Overview
© 2026 Direct Cursus Technology L.L.C.