> For the complete documentation index, see [llms.txt](https://docs.weka.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.weka.io/additional-protocols/s3/s3-users-and-authentication/s3-users-and-authentication-1.md).

# Manage S3 service accounts using the CLI

Create, view, and remove S3 service accounts using the CLI.

## View existing S3 service accounts

Lists the S3 service accounts defined on the cluster.

**Command:** `weka s3 service-account list`

```sh
weka s3 service-account list
```

## Add an S3 service account

Creates an S3 service account, which lets an application authenticate to S3 without a cluster user.

**Command:** `weka s3 service-account add`

```sh
weka s3 service-account add [--policy-file <string>]
```

**Parameters**

| Parameter                 | Description                          |
| ------------------------- | ------------------------------------ |
| `--policy-file` \<string> | File containing JSON policy content. |

{% hint style="warning" %}
The secret key is visible **only once** when adding the S3 service account. You must save the secret key in a safe place for later use.
{% endhint %}

## Show an S3 service account details

Shows the details of a single S3 service account.

**Command:** `weka s3 service-account show`

```sh
weka s3 service-account show <access-key>
```

**Parameters**

| Parameter      | Description                                |
| -------------- | ------------------------------------------ |
| `access-key`\* | Access key of the service account to show. |

## Remove S3 service account

Deletes an S3 service account and invalidates its credentials.

**Command:** `weka s3 service-account remove`

```sh
weka s3 service-account remove <access-key>
```

**Parameters**

| Parameter      | Description                                  |
| -------------- | -------------------------------------------- |
| `access-key`\* | Access key of the service account to remove. |

**Related topics**

[S3 users and authentication](/additional-protocols/s3/s3-users-and-authentication.md#s3-service-accounts)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.weka.io/additional-protocols/s3/s3-users-and-authentication/s3-users-and-authentication-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
