Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Object Storage
    • All guides
      • Creating a bucket
      • Deleting a bucket
      • Limiting the maximum bucket size
      • Configuring and disabling default encryption
      • Configuring object lifecycles
      • Configuring CORS
      • Configuring access permissions using IAM
      • Editing a bucket ACL
      • Managing an access policy
      • Enabling and disabling public access to a bucket
      • Disabling access with static keys
      • Accessing a bucket using Security Token Service
      • Gaining access to a bucket using an ephemeral access key
      • Configuring access to a bucket using a service connection from VPC
      • Searching for sensitive data in a bucket
      • Enabling and pausing bucket versioning
      • Logging bucket actions
      • Enabling and disabling object lock
      • Managing object metadata export
      • Managing bucket labels
      • Getting a list of buckets
      • Getting bucket information and statistics
      • Viewing bucket metrics
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Buckets
  3. Disabling access with static keys

Disabling static keys for access to a bucket

Written by
Yandex Cloud
Updated at November 2, 2026
View as Markdown

Object Storage incorporates several access management methods. To learn how these methods work together, see Access management methods in Object Storage: Overview.

By default, one can access a bucket using static access keys. You can disable this access option to only allow access with an IAM token or anonymous access, if enabled in the bucket settings.

Note

Once disabled, access with static keys will be denied to all tools using this access option: the AWS CLI, SDK, and third-party applications. Access via ephemeral keys, temporary Security Token Service access keys, and pre-signed URLs will also be terminated.

The minimum required role to disable access with static keys is storage.admin. For more information, see the role description.

To disable bucket access with static keys, follow these steps:

Yandex Cloud CLI
REST API
gRPC API

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

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

If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for updating a bucket:

    yc storage bucket update --help
    
  2. Get a list of buckets in the default folder:

    yc storage bucket list
    

    Result:

    +------------------+----------------------+-------------+-----------------------+---------------------+
    |       NAME       |      FOLDER ID       |  MAX SIZE   | DEFAULT STORAGE CLASS |     CREATED AT      |
    +------------------+----------------------+-------------+-----------------------+---------------------+
    | first-bucket     | b1gmit33ngp6******** | 10737418240 | STANDARD              | 2025-11-20 09:45:36 |
    +------------------+----------------------+-------------+-----------------------+---------------------+
    
  3. Save the NAME of the bucket for which you want to disable access with static keys.

  4. Disable using static keys for bucket access:

    yc storage bucket update \
      --name <bucket_name> \
      --disable-statickey-auth true
    

    Where:

    • --name: Name of the bucket for which you need to disable access with static keys.
    • --disable-statickey-auth: Flag to disable access with static keys. It can either be true or false.

    Result:

    name: first-bucket
    folder_id: b1gmit33ngp6********
    default_storage_class: STANDARD
    versioning: VERSIONING_DISABLED
    max_size: "53687091200"
    acl: {}
    created_at: "2022-12-16T13:58:18.933814Z"
    disabled_statickey_auth: true
    

To disable bucket access with static keys, use the update REST API method for the Bucket resource.

Run this query:

curl -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <IAM_token>" \
  -d '{
       "updateMask":"disabledStatickeyAuth",
       "disabledStatickeyAuth":true
      }' \
"https://storage.api.cloud.yandex.net/storage/v1/buckets/<bucket_name>"

Where:

  • <bucket_name>: Name of the bucket for which you need to disable access with static keys.
  • <IAM_token>: IAM token of the user with the storage.admin role for the bucket.

Result:

{
  "done": true,
  "metadata": {
    "@type": "type.googleapis.com/yandex.cloud.storage.v1.UpdateBucketMetadata",
    "name": "first-bucket"
  },
  "response": {
    "@type": "type.googleapis.com/yandex.cloud.storage.v1.Bucket",
    "acl": {},
    "disabledStatickeyAuth": true,
    "name": "first-bucket",
    "folderId": "b1g07hj5r6i4********",
    "defaultStorageClass": "STANDARD",
    "versioning": "VERSIONING_DISABLED",
    "maxSize": "53687091200",
    "createdAt": "2025-11-20T09:45:36.230463Z",
    "resourceId": "e3eruofcbqc2********"
  },
  "id": "e3enqoaug76p********",
  "description": "update bucket",
  "createdAt": "2025-12-22T20:47:01.424654Z",
  "createdBy": "ajeb9l33h6mu********",
  "modifiedAt": "2025-12-22T20:47:01.424654Z"
}

Follow the status of the operation by the done field.

To disable bucket access with static keys, use the BucketService/Update gRPC API call.

Run this query:

grpcurl \
  -H "Authorization: Bearer <IAM_token>" \
  -d '{
    "name": "<bucket_name>",
    "update_mask": {
      "paths": ["disabled_statickey_auth"]
    },
    "disabled_statickey_auth": true
  }' \
  storage.api.cloud.yandex.net:443 \
  yandex.cloud.storage.v1.BucketService/Update

Where:

  • <bucket_name>: Name of the bucket for which you need to disable access with static keys.
  • <IAM_token>: IAM token of the user with the storage.admin role for the bucket.

Result:

{
  "id": "e3efo38nps32********",
  "description": "update bucket",
  "createdAt": "2026-04-27T13:25:02.835201Z",
  "createdBy": "ajelcjkv67arbc0qe68j",
  "modifiedAt": "2026-04-27T13:25:02.835201Z",
  "done": true,
  "metadata": {
    "@type": "type.googleapis.com/yandex.cloud.storage.v1.UpdateBucketMetadata",
    "name": "first-bucket"
  },
  "response": {
    "@type": "type.googleapis.com/yandex.cloud.storage.v1.Bucket",
    "acl": {},
    "createdAt": "2024-06-07T13:54:56.127808Z",
    "defaultStorageClass": "STANDARD",
    "disabledStatickeyAuth": true,
    "folderId": "b1gsm0k26v1l********",
    "name": "first-bucket",
    "resourceId": "e3ead1djqq0m********",
    "versioning": "VERSIONING_DISABLED"
  }
}

Was the article helpful?

Previous
Enabling and disabling public access to a bucket
Next
Accessing a bucket using Security Token Service
© 2026 Direct Cursus Technology L.L.C.