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

Using the SDK for Bash functions

Written by
Yandex Cloud
Updated at March 28, 2025

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

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

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 YC CLI commands to be executed successfully, use the --folder-id or --cloud-id flags to specify the folder or cloud ID, respectively.

The runtime environment comes with pre-installed AWS CLI version 2 for support of Yandex Cloud-compatible services, such as Yandex Object Storage and Yandex Message Queue.

In which case copy the static access keys for the service account and provide them, e.g., via the function's environment variables.

For more information and sample commands, see AWS Command Line Interface and the Yandex Message Queue documentation.

Was the article helpful?

Previous
Handling errors
Next
Overview
© 2025 Direct Cursus Technology L.L.C.