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
    • Invocation context
    • 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 Go
  2. Managing dependencies

Building and managing Go function dependencies

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

At the build stage, Cloud Functions automatically installs dependencies required for a Go function when creating a new function version.

Note

The build gets the ycf build tag.

For this, Cloud Functions supports two methods of automatic dependency management: modules and the dep utility.

modmod

Modules are a built-in dependency management solution for Go. They are the primary and recommended way to manage dependencies in Cloud Functions.

To deliver dependencies using modules, upload the go.mod file together with the function source code. This will install the latest versions of the packages specified in this file. To specify the versions explicitly, also upload the go.sum file.

Warning

Make sure the module name in the go.mod file is not main.

The go.mod file must not specify the Go version, since the plugin generated by the builder must use exactly the same Go version as the runtime environment.

depdep

Warning

This method of managing dependencies is deprecated and no longer supported in language version 1.16.

Dep is a dependency management system for Go.

To deliver dependencies using dep, upload the Gopkg.toml and Gopkg.lock files together with the function source code. In this case, the dep ensure command runs just before building the code.

Note

If you have both go.mod and Gopkg.toml among the files, the build system may not work as expected. We do not recommend using these two files at the same time.

Dependency installation is limited in terms of resources and execution time. For more information, see Quotas and limits in Cloud Functions. You can view the dependency installation log via the link displayed in the list of operations.

Was the article helpful?

Previous
Overview
Next
Request handler
© 2026 Direct Cursus Technology L.L.C.