Yandex Cloud
Search
Discuss with expertTry 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 Cloud Functions
  • Comparing with other Yandex Cloud services
    • Overview
    • Managing dependencies
    • Request handler
    • Logging
    • Error handling
    • Using the SDK
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ
  1. Developing in Bash
  2. Using the SDK

Using the SDK for a function in Bash

Written by
Yandex Cloud
Updated at July 2, 2026
View in Markdown

The runtime comes with the Yandex Cloud CLI installed by default to work with the Yandex Cloud API.

The user works with Yandex Cloud services using the service account specified in the Bash function. This does not require any additional steps from the user: the utility automatically applies the service account.

For example, you can get a list of cloud folders using the following script:

#!/bin/bash
set -e

HOME=/tmp yc --format json resource-manager folder list --cloud-id <cloud_ID> | jq -c  '{body:. | tostring}'

For the Yandex Cloud CLI commands to be executed successfully, use the --folder-id or --cloud-id parameters to specify the folder or cloud ID, respectively.

The runtime comes with pre-installed AWS CLI version 2 to support Yandex Cloud services compatible with the AWS API. To use it:

  1. Create a static access key for the service account.
  2. Save the static access key to a Yandex Lockbox secret.
  3. Provide the Yandex Lockbox secret to your function.

For more information and examples of commands, see AWS Command Line Interface and the relevant documentation of AWS-compatible Yandex Cloud services.

Was the article helpful?

Previous
Error handling
Next
Overview
© 2026 Direct Cursus Technology L.L.C.