Yandex Cloud
Search
Contact UsTry 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 Identity and Access Management
    • All guides
    • Handling secrets that are available in the public domain
    • Users
    • User groups
      • Creating a service account
      • Viewing the folder's service accounts
      • Updating a service account
      • Assigning roles to a service account
      • Setting up service account access permissions
      • Using impersonation
      • Getting service account info
      • Getting an ID token for a service account
      • Deleting a service account
  • Secure use of Yandex Cloud
  • Access management
  • Pricing policy
  • Role reference
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Service accounts
  3. Updating a service account

Updating a service account

Written by
Yandex Cloud
Improved by
Danila N.
Updated at January 20, 2026

You can change a service account's name and description. Using the Yandex Cloud API you can also label a service account.

To change a service account's roles, follow this guide.

Management console
CLI
Terraform
API

To update a service account:

  1. In the management console, click in the top panel and select the folder the service account belongs to.

  2. In the list of services, select Identity and Access Management.

  3. In the left-hand panel, select Service accounts.

  4. In the row with the service account you need, click and select **Edit **.

  5. Change the name of your service account.

    Follow these naming requirements:

    • It must be from 2 to 63 characters long.
    • It can only contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  6. Change the description of your service account.

  7. Click Save.

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

To update a service account:

  1. See the description of the update service account command:

    yc iam service-account update --help
    
  2. Select a service account, e.g., my-robot:

    yc iam service-account list
    

    Result:

    +----------------------+------------------+-------------------------------+
    |          ID          |       NAME       |          DESCRIPTION          |
    +----------------------+------------------+-------------------------------+
    | aje6o61dvog2******** | my-robot         |                               |
    | aje9sda1ufvq******** | account_name     | account_description           |
    +----------------------+------------------+-------------------------------+
    
  3. Change the service account parameters, such as name and description:

    yc iam service-account update my-robot \
      --new-name my-service-account \
      --description "this is my service account"
    

    Follow these naming requirements:

    • It must be from 2 to 63 characters long.
    • It can only contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To update a service account:

  1. Open the Terraform configuration file and edit the fragment with the service account description.
    Example of the service account description in the Terraform configuration:

    ...
    resource "yandex_iam_service_account" "sa" {
      name        = "my-robot"
      description = "this is new description"
     }
    ...
    
  2. Check the configuration using this command:

    terraform validate
    

    If the configuration is correct, you will get this message:

    Success! The configuration is valid.
    
  3. Run this command:

    terraform plan
    

    You will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.

  4. Apply the changes:

    terraform apply
    
  5. Confirm the changes: type yes into the terminal and press Enter.

    You can check whether the service account has been updated in the management console or using the CLI command:

    yc iam service-account list
    

To update a service account, use the update REST API method for the ServiceAccount resource or the ServiceAccountService/Update gRPC API call.

Was the article helpful?

Previous
Viewing the folder's service accounts
Next
Assigning roles to a service account
© 2026 Direct Cursus Technology L.L.C.