> For the complete documentation index, see [llms.txt](https://docs.vngcloud.vn/vng-cloud-document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vngcloud.vn/vng-cloud-document/vn/vstorage/object-storage/object-storage-han02/quan-ly-truy-cap/lam-viec-voi-s3-keys.md).

# Làm việc với S3 Keys

## **Tổng quan**

Trên hệ thống vStorage, S3 key là cặp key bao gồm access key và secret key được vStorage tích hợp và tương thích với các client tool của S3 như s3cmd, s3 SDK,...

***

## Root User Account khởi tạo S3 keys

Để khởi tạo S3 key, làm theo hướng dẫn bên dưới:

1. Đăng nhập vào [https://vstorage.console.vngcloud.vn](https://vstorage.console.vngcloud.vn/storage/list) với tài khoản <mark style="background-color:orange;">Root User Account</mark>.
2. Chọn **Region HAN02.**
3. Chọn biểu tượng <img src="/files/EwUZM4uPSXVKUweK7ZDx" alt="" data-size="line"> tại project mà bạn vừa khởi tạo sau đó chọn mục **Identity and Access Management.**
4. Tại mục **List of S3 keys of this project**, chọn **Generate S3 key**.
5. Chọn **Copy** hoặc **Download** để tải xuống thông tin Access Key/Secret Key mà bạn vừa khởi tạo.

<figure><img src="/files/FG4XGzhYnYqtbsJTzcBm" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MFN35MLwyivAkPCFQnbW" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/PYq72dF2ulPGooe3mrIj" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Chú ý:**

* Sau khi nhấn tạo S3 key, bạn cần **lưu lại cặp Access Key/Secret Key** để sử dụng, nếu bạn không lưu trữ ngay lúc này thì sau đó không thể lấy được Secret Key của Access Key này.
* <mark style="background-color:orange;">S3 key được khởi tạo bởi</mark> <mark style="background-color:orange;">**Root User Account**</mark> <mark style="background-color:orange;">sẽ có toàn quyền truy cập/ thao tác trên các bucket thuộc project này.</mark>
  {% endhint %}

***

## IAM User Account khởi tạo S3 keys

Để khởi tạo S3 key, làm theo hướng dẫn bên dưới:

1. Đăng nhập vào [https://vstorage.console.vngcloud.vn](https://vstorage.console.vngcloud.vn/storage/list) với tài khoản <mark style="background-color:orange;">IAM User Account</mark>.
2. Chọn **Region HAN02.**
3. Chọn biểu tượng <img src="/files/EwUZM4uPSXVKUweK7ZDx" alt="" data-size="line"> tại project mà bạn vừa khởi tạo sau đó chọn mục **Identity and Access Management.**
4. Tại mục **List of S3 keys of this project**, chọn **Generate S3 key**.
5. Chọn **Copy** hoặc **Download** để tải xuống thông tin Access Key/Secret Key mà bạn vừa khởi tạo.

<figure><img src="/files/hTeA4KrONRWQHDxHtBUl" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Chú ý:**

* Sau khi nhấn tạo S3 key, bạn cần **lưu lại cặp Access Key/Secret Key** để sử dụng, nếu bạn không lưu trữ ngay lúc này thì sau đó không thể lấy được Secret Key của Access Key này.
* <mark style="background-color:orange;">S3 key được khởi tạo bởi</mark> <mark style="background-color:orange;">**IAM User Account**</mark> <mark style="background-color:orange;">sẽ có toàn quyền truy cập/ thao tác trên các bucket/object theo quyền hạn của IAM User Account đó. Ví dụ, nếu IAM User Account của bạn chỉ có quyền Read Object thì S3 keys tạo bởi IAM User Account này cũng chỉ có quyền Read Object.</mark>
  {% endhint %}

***

## Thực hiện làm việc với S3 API (hoặc 3rd party software) thông qua S3 keys

### Kết nối 3rd party softwares với vStorage

Sau khi bạn đã thực hiện khởi tạo project và khởi tạo S3 key thành công, lúc này bạn có thể sử dụng các 3rd party softwares để kết nối và làm việc với project của bạn. Các công cụ 3rd party softwares bạn có thể lựa chọn sử dụng có thể là S3cmd, Cyberduck, Rclone, S3 Browser, MinIO Client,...Trong phạm vi tài liệu này, chúng tôi sẽ hướng dẫn bạn kết nối S3 Browser với vStorage. S3 Browser là công cụ được tối ưu hóa cho phép bạn chia sẻ và tải lên tệp tin của mình. Công cụ này có giao diện tương đối đơn giản, dễ sử dụng và đã tương thích với API của dịch vụ lưu trữ vStorage.

Để tích hợp công cụ S3 Browser với vStorage, bạn có thể thực hiện theo hướng dẫn bên dưới:

1. Tải công cụ người dùng S3 Browser tại đây <https://s3browser.com/download.aspx>.
2. Mở ứng dụng **S3 Browser.** Chọn thư mục **Account, sau đó chọn Add new account**

<figure><img src="/files/zdfBnly3qSdD5xpFLJyL" alt="" width="295"><figcaption></figcaption></figure>

3. Màn hình Add New Account hiển thị, lúc này bạn nhập các thông tin như sau:

* **Display name:** Tên hiển thị của account. Ví dụ: Demo\_HAN02
* **Account type**: Chọn **S3 Compatible Storage.**
* **REST Endpoint**: Đường dẫn đến vstorage, đối với Region HAN02 thì đường dẫn là han02.vstorage.vngcloud.vn
* **Access Key ID & Secret Access Key:** Là cặp S3 key bạn đã thực hiện generate tại bước 4 trước đó.

4. Chọn option **Use Secure transfer (SSL/TLS)** vì vStorage chỉ hỗ trợ kênh truyền đã được mã hoá (HTTPS, port 443) để đảm bảo an toàn dữ liệu, vStorage hiện tại không hỗ trợ kênh truyền không mã hoá (HTTP, port 80).
5. Chọn **Add new account.**

<figure><img src="/files/81XS4yAnFcmJxJHho78h" alt="" width="375"><figcaption></figcaption></figure>

6. Khi kết nối thành công, màn hình S3 Browser sẽ hiển thị như sau:

<figure><img src="/files/IW4fLBFiVGBGVCmpX5Ql" alt=""><figcaption></figcaption></figure>

***

## Xóa S3 keys

Để hủy (xóa) một hay nhiều S3 key đã tạo trước đó, hãy làm theo hướng dẫn bên dưới:

1. Đăng nhập vào [https://vstorage.console.vngcloud.vn](https://vstorage.console.vngcloud.vn/storage/list) với tài khoản <mark style="background-color:orange;">Root User Account</mark> hoặc tài khoản <mark style="background-color:orange;">IAM User Account</mark>.
2. Chọn **Region HAN02.**
3. Chọn biểu tượng <img src="/files/EwUZM4uPSXVKUweK7ZDx" alt="" data-size="line"> tại project mà bạn vừa khởi tạo sau đó chọn mục **Identity and Access Management.**
4. Tại mục **List of S3 keys of this project**, chọn **S3 key** mà bạn muốn xóa sau đó chọn **Delete.**

Kể từ thời điểm S3 key bị hủy thành công, bạn sẽ không thể sử dụng S3 key này để truy xuất vào vStorage. Hãy thận trọng khi thực hiện thao tác hủy (xóa) tài khoản S3 bởi bạn sẽ không thể khôi phục tài khoản đã xóa này.

<figure><img src="/files/ZfQyF4YAnvrZqPN13kvf" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.vngcloud.vn/vng-cloud-document/vn/vstorage/object-storage/object-storage-han02/quan-ly-truy-cap/lam-viec-voi-s3-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
