# AWS ECR

*Убедитесь, что у вас установлены последние версии AWS CLI и Docker.*

### Вам потребуется

* [x] Регион AWS вашего ECR
* [x] URI реестра

### Чтобы получить эту информацию, перейдите в консоль AWS

1. Перейдите в регион вашего ECR
2. Перейдите в Elastic Container Registry
3. Затем в Repositories
4. Нажмите на репозиторий, из которого вы хотите получить образ
5. Нажмите на **View push commands**.

### Разделите URI

По умолчанию AWS **URI** содержит реестр и образ, вам нужно разделить их

Представьте, что у вас есть это **URI**: **597351113950.dkr.ecr.ca-central-1.amazonaws.com/example**

Ваш **Репозиторий** будет: **597351113950.dkr.ecr.ca-central-1.amazonaws.com**

и ваш **Образ** будет: **example**

### Получите пароль

Чтобы получить пароль для входа в ECR

```bash
aws ecr get-login-password --region ca-central-1
```

{% hint style="success" %}
Вы можете заменить на свой регион (например, us-east-1, us-west-1 и т.д.).
{% endhint %}

#### Больше информации в [**документации AWS**](https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html)[**umentation**](https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html)

### Добавьте приложение в Edgegap

#### Пример API

{% hint style="info" %}
Имя пользователя всегда будет AWS
{% endhint %}

```json
{
    [...]
    "docker_repository": "597351113950.dkr.ecr.ca-central-1.amazonaws.com",
    "docker_image": "example",
    "docker_tag": "v1",
    "private_username": "AWS",
    "private_token": "<ecr login-password>",
    [...]
}
```

#### Из панели управления

На нашей панели управления **Токен приватного реестра** будет вашим **паролем для входа в ECR**

<figure><img src="/files/39405a6bc1155ce07f2232427b35bc8e0764832e" alt=""><figcaption></figcaption></figure>


---

# 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.edgegap.com/ru/docs/tools-and-integrations/container/external-registries/aws-ecr.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.
