# Examples

## Operations with buckets

{% tabs %}
{% tab title="list-buckets" %}

```
aws s3api list-buckets --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1
```

{% endtab %}

{% tab title="create-bucket" %}

```
aws s3api create-bucket --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --bucket="my-new-bucket" --region us-west-1
```

{% endtab %}

{% tab title="delete-bucket" %}

```
aws s3api delete-bucket --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --bucket="my-new-bucket" --region us-west-1
```

{% endtab %}
{% endtabs %}

## Operations with objects

{% tabs %}
{% tab title="list-objects" %}

```
aws s3api list-objects --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket"
```

{% endtab %}

{% tab title="list-objects-v2" %}

```
aws s3api list-objects-v2 --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket"
```

{% endtab %}

{% tab title="list-object-versions" %}

```
aws s3api list-object-versions --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket"
```

{% endtab %}

{% tab title="get-object" %}

```
aws s3api get-object --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket" --key="myfile.txt" "myfile.txt"
```

{% endtab %}
{% endtabs %}

## Operations with CORS

{% tabs %}
{% tab title="get-bucket-cors" %}

```
aws s3api get-bucket-cors --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket"
```

{% endtab %}

{% tab title="put-bucket-cors" %}

```
aws s3api put-bucket-cors --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --cors-configuration file://cors.json --bucket="my-new-bucket"
```

{% endtab %}

{% tab title="delete-bucket-cors" %}

```
aws s3api delete-bucket-cors --profile=impossiblecloud --endpoint-url=https://eu-central-2.storage.impossibleapi.net --region us-west-1 --bucket="my-new-bucket"
```

{% endtab %}
{% endtabs %}


---

# 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-1/examples.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.
