> 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/vstorage/object-storage/object-storage-han02/3rd-party-softwares/aws-cli/integrate-aws-cli-with-vstorage.md).

# Integrate AWS CLI with vStorage

Here are instructions for **downloading and installing AWS CLI v2** on popular operating systems: **Linux**, **macOS**, and **Windows**.

## 1. Install AWS CLI on **Linux**

### Requirements

* `curl`
* `unzip`
* `sudo` permissions for installation

### Steps to follow:

```bash
# 1. Download the installation file (default is the latest version)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

# 2. Unzip
unzip awscliv2.zip

# 3. Install
sudo ./aws/install

# 4. Check version
aws --version
```

> **Attention**: **We recommend using versions < 2.23.0**. From AWS CLI v2.23.0+, AWS enables `CRC64_NVME` by default, which can cause checksum-related errors with some S3-compatible services.

To install an older version (e.g. 2.22.0), you can follow these instructions:

```bash
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.0.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
```

or you can set it to only calculate and send checksums when requested by AWS service via command:

```bash
aws configure set request_checksum_calculation when_required
```

## 2. Install AWS CLI on **macOS**

```bash
# 1. Download the installation file
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"

# 2. Install
sudo installer -pkg AWSCLIV2.pkg -target /

# 3. Check version
aws --version
```

> **Attention**: If you are using the latest version (≥ 2.23.0), please set up after installation:

```bash
aws configure set request_checksum_calculation when_required
```

***

## 3. Install AWS CLI on **Windows**

1. Download file `.msi` here: <https://awscli.amazonaws.com/AWSCLIV2.msi>
2. Run the file and follow the instructions.
3. Open PowerShell/Command Prompt to check:

```bash
aws --version
```

> **Attention**: If you are using the latest version (≥ 2.23.0), please set up after installation:

```bash
aws configure set request_checksum_calculation when_required
```

***

## 4. Configure AWS CLI after installation

### Create configuration for the profile (e.g. `han02-prod`) via the command:

```bash
aws configure --profile han02-prod
```

Enter information:

* **AWS Access Key ID:** You can create and retrieve information from the vStorage Portal.
* **AWS Secret Access Key:** You can create and retrieve information from the vStorage Portal.
* **Default region name:** `HAN02`
* **Default output format:** `json`

<figure><img src="/files/4NFbBohUJaeKmZ6AMbQU" alt=""><figcaption></figcaption></figure>

### Check the connection via command:

```bash
# 1. Get a list of all buckets in the project
aws s3 ls --endpoint-url https://han02.vstorage.vngcloud.vn --profile han02-prod
```

For more details, please refer to <https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html>.


---

# 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/vstorage/object-storage/object-storage-han02/3rd-party-softwares/aws-cli/integrate-aws-cli-with-vstorage.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.
