Using the SDK for Bash functions
The runtime has the YC CLI for working with the Yandex Cloud API.
The user interacts with Yandex Cloud services using the service account specified in the Bash function. This doesn't require any additional actions from the user: the utility applies the service account automatically.
For example, you can get a list of available clouds using the following script:
#!/bin/bash
set -e
HOME=/tmp yc --format json resource-manager cloud list | jq -c '{body:. | tostring}'
In addition, to work with Yandex Cloud compatible services, such as Yandex Object Storage and Yandex Message Queue, the runtime environment has the AWS CLI version 2 utility pre-installed.
In this case, copy the static access keys for the service account and pass them, for example, using the function's environment variables.
For more information and sample commands, see AWS Command Line Interface and the Yandex Message Queue documentation.