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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
    • All guides
    • Getting an IAM token for a service account using a container
      • Making a container public
      • Making a container private
      • Viewing roles assigned to a container
      • Assigning roles to a container
      • Revoking roles assigned to a container
    • Viewing operations with service resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing rights to access a container
  3. Making a container public

Making a container public

Written by
Yandex Cloud
Updated at May 5, 2025

If you want any user to be able to invoke a container without providing the authorization header, make it public.

Management console
CLI
API
  1. In the management console, select the folder with your container.
  2. Select Serverless Containers.
  3. Select the container you want to make public.
  4. On the Overview tab, enable Public container.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To make a container public, run this command:

yc serverless container allow-unauthenticated-invoke <container_name>

Result:

done (1s)

To make a container public, use the setAccessBindings REST API method for the Container resource or the ContainerService/SetAccessBindings gRPC API call.

Request example

To use the example, install cURL and authenticate in the API.

  1. Prepare a file named body.json with the following request body:

    {
      "accessBindings": [
        {
          "roleId": "serverless-containers.containerInvoker",
          "subject": {
            "id": "allUsers",
            "type": "system"
          }
        }
      ]
    }
    

    Where:

    • roleId: Role to assign. The serverless-containers.containerInvoker role allows you to invoke a container.
    • id: Subject getting the role. allUsers: Any user. No authentication is required.
    • type: Type of the subject getting the role. system: Public group.
  2. Run the request stating the IAM token, path to the body.json file, and container ID:

    curl \
        --request POST \
        --header "Authorization: Bearer <IAM_token>" \
        --data "@<body.json_file_path>" \
        https://serverless-containers.api.cloud.yandex.net/containers/v1/containers/<container_ID>:setAccessBindings
    

    Result:

    {
     "done": false,
     "metadata": {
      "@type": "type.googleapis.com/yandex.cloud.access.SetAccessBindingsMetadata",
      "resourceId": "bba8dkc667bj********"
     },
     "id": "bbaoi3jn8plq********",
     "description": "operationSetAccessBindings",
     "createdAt": "2023-12-22T10:30:58.348672821Z",
     "createdBy": "aje07l4q4vmo********",
     "modifiedAt": "2023-12-22T10:30:58.348672821Z"
    }
    
  3. Make sure the role is assigned. To do this, run the request stating the IAM token and container ID:

    curl \
        --request GET \
        --header "Authorization: Bearer <IAM_token>" \
        https://serverless-containers.api.cloud.yandex.net/containers/v1/containers/<container_ID>:listAccessBindings
    

    Result:

    {
     "accessBindings": [
      {
       "subject": {
        "id": "allUsers",
        "type": "system"
       },
       "roleId": "serverless.containers.invoker"
      }
     ]
    }
    

Was the article helpful?

Previous
Configuring metadata service parameters
Next
Making a container private
Yandex project
© 2025 Yandex.Cloud LLC