Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • 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.
Command line interface
  • Getting started
    • All guides
    • Installation
    • Updates
    • Deletion
    • Working with command versions
    • Overview
    • help
    • init
      • Overview
        • Overview
        • add-access-binding
        • add-labels
        • allow-unauthenticated-invoke
        • create
        • delete
        • deny-unauthenticated-invoke
        • get
        • invoke
        • list
        • list-access-bindings
        • list-operations
        • list-scaling-policies
        • logs
        • remove-access-binding
        • remove-labels
        • remove-scaling-policy
        • set-access-bindings
        • set-scaling-policy
        • tag-history
        • update
          • Overview
          • create
          • delete
          • get
          • get-by-tag
          • list
          • logs
          • remove-tag
          • set-tag
    • version
  • Releases
  • Troubleshooting
  1. Reference
  2. serverless
  3. function
  4. version
  5. create

yc serverless function version create

Written by
Yandex Cloud
Updated at November 5, 2026
View in Markdown

Create new function version

Command UsageCommand Usage

Syntax:

yc serverless function version create (--function-id <FUNCTION_ID>|--function-name <FUNCTION_NAME>) [Flags...] [Global Flags...]

FlagsFlags

Flag

Description

--function-id

string

Function id.

--function-name

string

Function name.

--async

Display information about the operation in progress, without waiting for the operation to complete.

--runtime

string

Runtime. Valid values are listed by "serverless function runtime list".

--entrypoint

string

Entry point.

--memory

byteSize

Required memory. Example: '1GB', '128MB'. The default value is 128MB.

--execution-timeout

duration

Execution timeout. The default value is 3s

--service-account-id

string

Service account id.

--package-bucket-name

string

Storage bucket name of the function package.

--package-object-name

string

Storage object name of the function package.

--package-sha256

string

Sha256 of the function package.

--source-path

string

Local filesystem path of the function package: either directory or file (file can be a valid zip archive).

--source-version-id

string

ID of a version to make a copy from.

--description

string

Version description.

--environment

map<string><string>

Version environment variables.

--tags

[]string

Version tags.

--network-name

string

Version network name.

--network-id

string

Version network id.

--subnet-name

[]string

DEPRECATED: specify only the network (--network-name or --network-id), without the list of subnets.

Version subnet names.

--subnet-id

[]string

DEPRECATED: specify only the network (--network-name or --network-id), without the list of subnets.

Version subnet ids.

--add-service-account

PROPERTY=VALUE[,PROPERTY=VALUE...]

Adds a named service account to the version. Can be used multiple times.

Possible property names:

  • alias: Specifies an alias, through which the service account can be accessed.

  • id: Service account id

  • name: Service account name.

--secret

PROPERTY=VALUE[,PROPERTY=VALUE...]

Version secret.

Possible property names:

  • name: Specifies the secret name

  • id: Specifies the secret id

  • version-id: Specifies the secret version id. If not provided, current version of the secret will be used.

  • key: Specifies key of the entry in the secret to use.

  • environment-variable: Specifies environment variable name that the secret value will be loaded to.

--storage-mounts

PROPERTY=VALUE[,PROPERTY=VALUE...]

DEPRECATED: Use mounts instead. Storage mounts. Example: mount-point=dir,bucket=user-bucket,read-only=false

Possible property names:

  • mount-point: Mount point is used for creating the directory to which the bucket is mounted. It will be accessible by the path /function/storage/<mount_point>.

  • bucket: Specifies a name of the bucket mount to.

  • prefix: Specifies a prefix of the bucket. Leave empty to mount the entire bucket.

  • read-only: Select to mount bucket in read only mode.

--mount

PROPERTY=VALUE[,PROPERTY=VALUE...]

Add a mount to the version. Example: type=ephemeral-disk,mount-point=mnt1,size=5GB

Possible property names:

  • type: Specifies the type of the mount. Valid values are 'object-storage' and 'ephemeral-disk'.

  • mount-point: Mount point is used for creating the directory to which the target is mounted. It will be accessible by the path /function/storage/<mount_point>.

  • bucket: [object-storage] Specifies a name of the bucket mount to.

  • prefix: [object-storage] Specifies a prefix of the bucket. Leave empty to mount the entire bucket.

  • mode: [object-storage] Specifies mount's accessibility mode. Valid values are 'ro' and 'rw'.

  • size: [ephemeral-disk] Specifies the size of the disk for mount. Must be a multiple of a gigabyte. Example: '5GB'.

  • block-size: [ephemeral-disk] Specifies the optional block size of the disk for mount. Valid values: 4KB, 8KB, 16KB, 32KB, 64KB and 128KB.

--no-logging

Disable logging from function.

--log-group-id

string

Send logs to custom log group by id.

--log-group-name

string

Send logs to custom log group by name.

--log-folder-id

string

Send logs to default log group of custom folder by id.

--log-folder-name

string

Send logs to default log group of custom folder by name.

--min-log-level

string

Min log level. Values: 'trace', 'debug', 'info', 'warn', 'error', 'fatal'

--async-max-retries

int

Max retries for async invocation.

--async-service-account-id

string

Service account for asynchronous function invocation.

--async-success-ymq-arn

string

YMQ ARN target for success invocation.

--async-success-sa-id

string

Service account for writing successful result of async invocation function.

--async-failure-ymq-arn

string

YMQ ARN target for failure.

--async-failure-sa-id

string

Service account for writing unsuccessful result of async invocation function.

--tmpfs-size

byteSize

Size of memory for use as in-memory storage mounted as /tmp directory. Example: '512MB', '1GB'. The default value is 0B.

--concurrency

int

The maximum number of requests processed by a function instance at the same time.

--metadata-options

PROPERTY=VALUE[,PROPERTY=VALUE...]

Options set the access mode to function's metadata endpoints. Example: aws-v1-http-endpoint=disabled,gce-http-endpoint=enabled

Possible property names:

  • aws-v1-http-endpoint: Enables access to AWS flavored metadata (IMDSv1). Values: enabled, disabled

  • gce-http-endpoint: Enables access to GCE flavored metadata. Values: enabled, disabled

Global FlagsGlobal Flags

Flag

Description

--profile

string

Set the custom profile.

--region

string

Set the region.

--cloud-id

string

Set the ID of the cloud to use.

--folder-id

string

Set the ID of the folder to use.

--folder-name

string

Set the name of the folder to use (will be resolved to id).

--debug

Debug logging.

--debug-grpc

Debug gRPC logging. Very verbose, used for debugging connection problems.

--no-user-output

Disable printing user intended output to stderr.

--pager

string

Set the custom pager.

--no-pager

Do not pipe help output through a pager.

--format

string

Set the output format: text (default), yaml, json, json-rest.

--retry

int

Enable gRPC retries. By default, retries are enabled with maximum 5 attempts.
Pass 0 to disable retries. Pass any negative value for infinite retries.
Even infinite retries are capped with 2 minutes timeout.

--timeout

string

Set the timeout.

--token

string

Set the OAuth token to use.

--jq

string

Query to select values from the response using jq syntax

--endpoint

string

Set the Cloud API endpoint (host:port).

--impersonate-service-account-id

string

Set the ID of the service account to impersonate.

--no-browser

Disable opening browser for authentication.

--query

string

Query to select values from the response using jq syntax

--print-metadata

Print operation metadata along with result.

--syntax

string

Choose syntax option.

--cli-auto-prompt

string[="on"]

Enable interactive auto-prompt mode. Values: on, partial, off. Bare --cli-auto-prompt is equivalent to --cli-auto-prompt=on.

--no-cli-auto-prompt

Disable interactive auto-prompt mode (overrides --cli-auto-prompt, env and profile).

-h, --help

Display help for the command.

  • Allocating memory for the /tmp directory
  • Setting the number of concurrent function instance calls
  • Adding function environment variables
  • Configure asynchronous invocation
  • Providing Yandex Lockbox secrets to a function
  • Command example
  • Configuring metadata service parameters for a function
  • Mounting buckets to a function
  • Mounting an ephemeral disk in a function
  • Specifying a cloud network for running a function
  • Creating a function version

Was the article helpful?

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