# Accessing Buckets

## Creating a Key for Accessing Buckets in Object Storage

To access buckets in Krutrim Cloud’s **Object Storage**, you need to generate an API key using the Key Management Service (KMS). Follow the steps below to create and securely store your key.

***

### Steps to Create a Bucket API Key

1. **Navigate to KMS**
   * From the Krutrim Cloud Console, go to the **Key Management Service** section.
2. **Go to the Storage Section**
   * Inside KMS, select the **Storage** tab to view storage-related key options.
3. **Create a Bucket API Key**
   * Click on **Create Bucket API Key** to start the key generation process.
4. **Select Region**
   * Choose the region where your bucket resides.
   * This ensures the generated key will have access to buckets in that region.
5. **Create Key**
   * Click **Create** to generate your new API key.
6. **Retrieve Public and Private Keys**
   * Once created, you will be shown a **Public Key** and a **Private Key**.

{% hint style="warning" %}
The **Private Key** will only be displayed once.

* Copy and store it in a secure location immediately.
* Losing this key means you will have to generate a new one.
  {% endhint %}

***

### Usage

* Use the **Private Key** along with the **Public Key** to authenticate and access your buckets in Block Storage via APIs or SDKs.
* Ensure your private key is never exposed in public code repositories or logs.

***

**Security Best Practices**

* Store your private key in a secure password manager or encrypted vault.
* Rotate keys periodically for enhanced security.
* Revoke unused keys from the KMS to reduce exposure risks.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloud.olakrutrim.com/basics/key-management-system/accessing-buckets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
