Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for Trino
  • Getting started
    • All guides
    • Information about existing clusters
    • Creating a cluster
    • Updating a cluster
    • Stopping and starting a cluster
    • Connecting to a cluster
    • Deleting a cluster
  • Quotas and limits
  • Access management
  • Pricing policy
  • Release notes

In this article:

  • Roles for creating a cluster
  • Creating a cluster
  1. Step-by-step guides
  2. Creating a cluster

Creating a Trino cluster

Written by
Yandex Cloud
Updated at May 14, 2025
  • Roles for creating a cluster
  • Creating a cluster

Note

The service is at the Preview stage.

Each Managed Service for Trino cluster comprises a set of Trino components: coordinator and workers, which can be represented in multiple instances.

Roles for creating a clusterRoles for creating a cluster

To create a Managed Service for Trino cluster, your Yandex Cloud account needs the following roles:

  • managed-trino.admin: To create a cluster.
  • vpc.user: To use the cluster network.
  • iam.serviceAccounts.user: To link a service account to the cluster.

Make sure to assign the managed-trino.integrationProvider and storage.editor roles to the cluster service account. The cluster will thus get the permissions it needs to work with user resources.

For more information about assigning roles, see the Yandex Identity and Access Management documentation.

Creating a clusterCreating a cluster

Management console
REST API
gRPC API
  1. In the management console, select the folder where you want to create a Managed Service for Trino cluster.

  2. Select Managed Service for Trino.

  3. Click Create cluster.

  4. Under Basic parameters:

    1. Specify a name for the cluster. The name must be unique within the folder.

    2. (Optional) Enter a cluster description.

    3. Optionally, create labels:

      1. Click Add label.
      2. Enter a label in key: value format.
      3. Press Enter.
    4. Select an existing service account or create a new one.

      Make sure to assign the managed-trino.integrationProvider and storage.editor to the service account.

  5. Under Network settings, select a network, subnet, and security group for the cluster.

  6. Configure the coordinator and workers.

  7. Under Catalogs, add the required folders. You can do this either when creating the cluster or later.

    1. Specify a name for the folder. The name must be unique within the cloud.

    2. Select Connector type.

    3. Under Folder settings, set the parameters depending on the selected type:

      • For Hive, Iceberg, and Delta Lake connectors:

        • URI to connect to the Metastore cluster in this format: thrift://<IP_address>:<port>.
        • File storage: Select the file storage type: Yandex Object Storage or External storage. For external storage, specify the following settings:
          • AWS-compatible static access key ID.
          • AWS-compatible static access key secret key.
          • File storage endpoint, such as storage.yandexcloud.net.
          • File storage region, such as ru-central1.
      • For PostgreSQL and ClickHouse® connectors:

        • URL to connect to a cluster in this format: jdbc:<DBMS>://<host_address>:<port>/<DB_name>, where DBMS is postgresql or clickhouse.
        • Username to connect to the cluster.
        • User Password.
      • TPC-H and TPC-DS connectors provide access to test data and do not require configuration.

    4. Optionally, specify additional folder settings in key:value format.

  8. Under Advanced settings:

    1. Optionally, enable cluster deletion protection.

    2. Optionally, configure logging:

      1. Enable the Write logs setting.
      2. Select where the logs will be stored:
        • Folder: Select a folder from the list.
        • Group: Select a log group from the list or create a new one.
      3. Select Min. logging level from the list.
  9. Click Create.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Create a file named body.json and add the following contents to it:

    Note

    This example does not use all available parameters. For a list of all parameters, see the API documentation.

    {
      "folderId": "<folder_ID>",
      "name": "<cluster_name>",
      "description": "<cluster_description>",
      "labels": { <label_list> },
      "trino": {
        "coordinatorConfig": {
          "resources": {
            "resourcePresetId": "<resource_ID>"
          }
        },
        "workerConfig": {
          "resources": {
            "resourcePresetId": "<resource_ID>"
          },
          "scalePolicy": {
            "autoScale": {
              "minCount": "<minimum_number_of_instances>",
              "maxCount": "<maximum_number_of_instances>"
            }
          }
        }
      },
      "network": {
        "subnetIds": [ <list_of_subnet_IDs> ],
        "securityGroupIds": [ <list_of_security_group_IDs> ]
      },
      "deletionProtection": "<deletion_protection>",
      "serviceAccountId": "<service_account_ID>",
      "logging": {
        "enabled": "<use of_logging>",
        "folderId": "<folder_ID>",
        "minLevel": "<logging_level>"
      }
    }
    

    Where:

    • folderId: Folder ID. You can request it with the list of folders in the cloud.

    • name: Cluster name.

    • description: Cluster description.

    • labels: List of labels. Provide labels in "<key>": "<value>" format.

    • trino: Configuration of Trino cluster components.

      • coordinatorConfig: Coordinator configuration.

        • resources.resourcePresetId: ID of the coordinator’s computing resources. The possible values are:

          • c4-m16: 4 vCPUs, 16 GB RAM
          • c8-m32: 8 vCPUs, 32 GB RAM
      • workerConfig: Worker configuration.

        • resources.resourcePresetId: ID of the worker’s computing resources. The possible values are:

          • c4-m16: 4 vCPUs, 16 GB RAM
          • c8-m32: 8 vCPUs, 32 GB RAM
        • scalePolicy: Worker scaling policy:

          • fixedScale: Fixed scaling policy.

            • count: Number of workers.
          • fixed_scale: Automatic scaling policy.

            • minCount: Minimum number of workers.
            • maxCount: Maximum number of workers.

          Specify one of the two parameters: fixedScale or autoScale.

    • network: Network settings:

      • subnetIds: Subnet IDs list.
      • securityGroupIds: List of security group IDs.
    • deletionProtection: Enables cluster protection against accidental deletion. The possible values are true or false.

      Even if it is enabled, one can still connect to the cluster manually and delete it.

    • serviceAccountId: Service account ID.

    • logging: Logging parameters:

      • enabled: Enables logging. Logs generated by Trino components will be sent to Yandex Cloud Logging. The possible values are true or false.
      • minLevel: Minimum logging level. Possible values: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.
      • folderId: Folder ID. Logs will be written to the default log group for this folder.
      • logGroupId: Custom log group ID. Logs will be written to this group.

      Specify one of the two parameters: folderId or logGroupId.

  3. Use the Cluster.create method and send the following request, e.g., via cURL:

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters'
        --data '@body.json'
    
  4. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Create a file named body.json and add the following contents to it:

    Note

    This example does not use all available parameters. For a list of all parameters, see the API documentation.

    {
      "folder_id": "<folder_ID>",
      "name": "<cluster_name>",
      "description": "<cluster_description>",
      "labels": { <label_list> },
      "trino": {
        "coordinator_config": {
          "resources": {
            "resource_preset_id": "<resource_ID>"
          }
        },
        "worker_config": {
          "resources": {
            "resource_preset_id": "<resource_ID>"
          },
          "scale_policy": {
            "auto_scale": {
              "min_count": "<minimum_number_of_instances>",
              "max_count": "<maximum_number_of_instances>"
            }
          }
        }
      },
      "network": {
        "subnet_ids": [ <list_of_subnet_IDs> ],
        "security_group_ids": [ <list_of_security_group_IDs> ]
      },
      "deletion_protection": "<deletion_protection>",
      "service_account_id": "<service_account_ID>",
      "logging": {
        "enabled": "<use of_logging>",
        "folder_id": "<folder_ID>",
        "min_level": "<logging_level>"
      }
    }
    

    Where:

    • folder_id: Folder ID. You can request it with the list of folders in the cloud.

    • name: Cluster name.

    • description: Cluster description.

    • labels: List of labels. Provide labels in "<key>": "<value>" format.

    • trino: Configuration of Trino cluster components.

      • coordinator_config: Coordinator configuration.

        • resources.resource_preset_id: ID of the coordinator’s computing resources. The possible values are:

          • c4-m16: 4 vCPUs, 16 GB RAM
          • c8-m32: 8 vCPUs, 32 GB RAM
      • worker_config: Worker configuration.

        • resources.resource_preset_id: ID of the worker’s computing resources. The possible values are:

          • c4-m16: 4 vCPUs, 16 GB RAM
          • c8-m32: 8 vCPUs, 32 GB RAM
        • scale_policy: Worker scaling policy:

          • fixed_scale: Fixed scaling policy.

            • count: Number of workers.
          • fixed_scale: Automatic scaling policy.

            • min_count: Minimum number of workers.
            • max_count: Maximum number of workers.

          Specify one of the two parameters: fixed_scale or auto_scale.

    • network: Network settings:

      • subnet_ids: Subnet IDs list.
      • security_group_ids: List of security group IDs.
    • deletion_protection: Enables cluster protection against accidental deletion. The possible values are true or false.

      Even if it is enabled, one can still connect to the cluster manually and delete it.

    • service_account_id: Service account ID.

    • logging: Logging parameters:

      • enabled: Enables logging. Logs generated by Trino components will be sent to Yandex Cloud Logging. The possible values are true or false.
      • min_level: Minimum logging level. Possible values: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.
      • folder_id: Folder ID. Logs will be written to the default log group for this folder.
      • log_group_id: Custom log group ID. Logs will be written to this group.

      Specify one of the two parameters: folder_id or log_group_id.

  4. Use the ClusterService/Create call and send the following request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d @ \
        trino.api.cloud.yandex.net:443 \
        yandex.cloud.trino.v1.ClusterService.Create \
        < body.json
    
  5. View the server response to make sure the request was successful.

Was the article helpful?

Previous
Information about existing clusters
Next
Updating a cluster
© 2025 Direct Cursus Technology L.L.C.