# AWS CLI basic commands

## General commands syntax

This section is designed to explain the most important concepts and notations used in the set of high-level '**s3**' commands.

```
aws s3 <Command> [<Arg> ...]
```

{% tabs %}
{% tab title="Syntax" %}

```
aws s3 --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net <ACTION> <FILE SOURCE> <FILE DESTINATION>
```

{% endtab %}
{% endtabs %}

## Supported high-level commands

**cp**- copy

**mv**- move

**ls** - list buckets

**rm** - remove an object

**mb** - make a bucket

**rb** - remove a bucket

**sync** - sync directories with new and updated files

{% tabs %}
{% tab title="ls" %}

```
aws s3 ls --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net
```

{% endtab %}

{% tab title="mb" %}

```
aws s3 mb --profile=impossiblecloud --endpoint-url=https://us-west-1.storage.impossibleapi.net s3://my-new-bucket-name
```

{% endtab %}

{% tab title="rb" %}

```
aws s3 rb --profile=impossiblecloud --endpoint-url=https://us-west-1.storage.impossibleapi.net s3://my-new-bucket-name
```

{% endtab %}
{% endtabs %}

Add the **--recursive** flag for multiple objects operations

{% tabs %}
{% tab title="Copy a single object:" %}

```
aws s3 --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net cp myfile.txt s3://your-company-bucket-name/
```

{% endtab %}

{% tab title="Move multiple objects" %}

```
aws s3 --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net mv s3://your-company-bucket-name/ s3://your-company-bucket-name2 --recursive
```

{% endtab %}
{% endtabs %}

## Use of Exclude and Include Filters

Most commands have **--exclude "\<value>"** and **--include "\<value>"** parameters that can achieve the desired result. These parameters perform pattern matching to either ex- or include a particular file or object. The following pattern symbols are supported:

* \*: Matches everything
* **?**: Matches any single character
* **\[sequence]**: Matches any character in **sequence**
* **\[!sequence]**: Matches any character not in **sequence**

{% hint style="info" %}
By default, *all files are included*. This means that providing only an **--include** filter will not change what files are transferred. **--include** will only re-include files that have been excluded from an **--exclude** filter
{% endhint %}

See more information on the AWS CLI here: <https://aws.amazon.com/cli/>


---

# 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.impossiblecloud.com/impossible-cloud-help/impossible-cloud-storage-guide/cli-user-guide/aws-cli-commands.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.
