# Using Impossible Cloud with AWS CLI

There are two ways to use Impossible Cloud with the AWS CLI.

## Method 1

The first method involves adding the following subcommand after every command:

**--endpoint-url=**[**https://eu-central-2.storage.impossibleapi.net**](https://eu-central-2.storage.impossibleapi.net)

For example, if you want to list your buckets in the CLI, please type:

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

or use a specific profile:

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

## Method 2

To make it easier to access third-party S3 providers, you can use the [awscli-plugin-endpoint](https://pypi.org/project/awscli-plugin-endpoint/) plugin, but you will need to create an additional profile along with the default one. To create this profile, you can add a "profile" line at the end of the config file located in the ".aws" directory in your home directory.

Add a line profile line at the end of the config file like this at the end of the file:

```
[profile impossiblecloud]
```

After you've added the "profile" line to the config file, be sure to save the file.

Once you have created a profile, you can follow the instructions provided on the plugin's GitHub page, which you can find at this link: <https://github.com/wbinglee/awscli-plugin-endpoint>. By doing so, you should be able to use "**--profile impossiblecloud**" after every command instead of having to type out the entire URL.

For instance, if you wish to list your buckets using the AWS CLI, simply type:

```
aws s3 ls --profile=impossiblecloud
```

{% hint style="warning" %}
If you need to create a bucket in a specific region, you have to use the appropriate [regional endpoint](/impossible-cloud-help/impossible-cloud-storage-guide/storage-console-urls-and-api-endpoints.md) to make a request. For example if you need to create a new bucket in the **eu-west-1** region:

\
\&#xNAN;*aws s3api create-bucket --profile impossiblecloud **--endpoint-url <https://eu-west-1.storage.impossibleapi.net>** --bucket mytestbucket*\
\
\&#xNAN;*If you were using another regional endpoint, then the bucket will be created in that endpoint. The parameters **--region** and **-*****-create-bucket-configuration LocationConstraint** are ignored.
{% endhint %}


---

# 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/using-impossible-cloud-with-aws-cli.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.
