# Setting Up AWS ECR

Amazon Elastic Container Registry (Amazon ECR) is a fully managed container registry that provides highly available and secure hosting for container images and artifacts. It allows you to deploy your applications reliably anywhere.

## 1. Navigate to the External Registry Creation Screen

1\) Move to \[Build Configuration] - \[External Container Registry].

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FqwTfl7p8pDl4SYqqLLYJ%2Fimage.png?alt=media&#x26;token=db9d1f40-ab86-4149-8b00-4413274dd4ff" alt=""><figcaption><p>[Screen] Registry</p></figcaption></figure>

2\) Click the "+ Register" button in the upper right corner and select the provider you want to create.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FICbSNz67xj9GeNL69taD%2Fimage.png?alt=media&#x26;token=f2cbd943-ab61-4275-9ef9-33a4878fd970" alt=""><figcaption><p>[Screen] Select External Registry</p></figcaption></figure>

## 2. Enter Registry Registration Information

1\) Click the "+ Register" button, and then select "AWS ECR"

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FkJDhQgKwLqdMmMzE1wW1%2Fimage.png?alt=media&#x26;token=9376452f-aa49-42af-b72a-ba9026e4147c" alt=""><figcaption><p>[Screen] Select External Registry (AWS ECR)</p></figcaption></figure>

2\) After entering the AWS authentication information in the basic details, click the "Test Connection" button.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FUTSaJ0460uhyWbo6TTVp%2Fimage.png?alt=media&#x26;token=8b535d90-f6a5-4ef1-bd6c-d29295698185" alt=""><figcaption><p>[Screen] Register AWS Registry Authentication Information</p></figcaption></figure>

| Item (\* is required) | Content                                                                        |
| --------------------- | ------------------------------------------------------------------------------ |
| Name\*                | Enter the name for the external container registry you want to register        |
| Description           | Enter the description for the external container registry you want to register |
| Endpoint URL\*        | Endpoint Address of the External Container Registry                            |
| Region\*              | Region of the Registered Registry                                              |
| Registry\*            | Name of the Registered Registry                                                |
| Access ID\*           | Access Key                                                                     |
| Access Secret\*       | Secret Access Key                                                              |

1. Enter the name of the registry to be created in the registry.
2. Enter a description for the registry in the description.
3. Enter the EndPoint URL in the correct format.
4. Select the region of the registered registry.
5. Enter the name of the registered registry.
6. Enter Access ID and Access Secret.
7. Click "Test Connection" in the upper right corner to verify if the registry is available.
8. Click the "Save" button in the upper right corner.

***

### Access ID & Access Secret Verification Method

1\) Access the AWS Console to retrieve the necessary information.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FuYqijYq4qLCAPdMtIS1H%2Fimage.png?alt=media&#x26;token=f1ed16e9-4dd8-4ea9-b2e9-7e028ba272fa" alt=""><figcaption></figcaption></figure>

{% embed url="<https://console.aws.amazon.com/console/home>" fullWidth="false" %}

2\) Click on the registered user, then click the <img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FAYNI4pz9Wm8XOrP3WY40%2Fimage.png?alt=media&#x26;token=e9b9aaec-a4c5-4ac1-bdb7-896da95898f7" alt="" data-size="line"> tab, and click the <img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FnnQKMIX5UJ7QMd9BY40S%2Fimage.png?alt=media&#x26;token=d1f04a05-97ff-4e0c-93f4-fbed7c4e0c9e" alt="" data-size="line"> button in the upper right corner of the "Access keys" box.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FAULJL3qXOaTFBZ8RCqzs%2Fimage.png?alt=media&#x26;token=7ec98140-6ebc-4071-bd27-25f2cf249fd5" alt=""><figcaption></figcaption></figure>

3\) Click "Other" among the next buttons and click "Next."

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FCAiJSsEIWZs1p54e8P03%2Fimage.png?alt=media&#x26;token=e5a232be-87d2-4f6a-9757-a30d23dbc717" alt=""><figcaption></figcaption></figure>

4\) Enter a description tag for the access key to be created and click the "Create access key" button.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FZK6sqXV0Pv5y8KDy9EJE%2Fimage.png?alt=media&#x26;token=8d9b9b90-b7a6-46d6-877d-078aa910332e" alt=""><figcaption></figcaption></figure>

5\) Confirm the generated access key and secret access key values.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FcrbLQ0irQ1bUJoPPNvko%2Fimage.png?alt=media&#x26;token=070485d2-3371-4a87-9a8c-bfbc5d048497" alt=""><figcaption></figcaption></figure>

### Creating a Registry

You can create both private and public repositories.

(Note: This guide is written based on the private repository in the 'us-east-1' region, and the process is the same for public repositories.)

{% embed url="<https://us-east-1.console.aws.amazon.com/ecr/>" %}

1\) Click the "Create Repository" button in the upper right corner.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2F4OuXGSfvTpYSJVnnYbpa%2Fimage.png?alt=media&#x26;token=c8979a64-63f6-436b-9e02-a8b741383dd2" alt=""><figcaption></figcaption></figure>

2\) Enter the repository name to create the repository.

(In Cocktails, builds are done with "Registry Address/Image Name" so please make sure to **create the registry** as "<mark style="color:red;">**Registry Name/Image Name**</mark>")

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FyqeHqzXjihqtBDGcRido%2Fimage.png?alt=media&#x26;token=258b7db9-496f-46fd-9206-d868fdd5e4cc" alt=""><figcaption></figcaption></figure>

### EndPoint URL & registry Verification Method

1\) Retrieve the necessary information from the list of created repositories in Cocktails.

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FqgHJsX6HKOrheAURl1wi%2Fimage.png?alt=media&#x26;token=cbc2ee6a-8162-4ced-8dab-42cc7635a1fc" alt=""><figcaption></figcaption></figure>

`EndPoint URL` : The table below provides the necessary information

| Category | EndPoint URL                                 |
| -------- | -------------------------------------------- |
| Private  | (User Number).dkr.ecr.(Region).amazonaws.com |
| Public   | public.ecr.aws/(User Alias)                  |

Registry : Repository Name Created by User

***

※ Permissions need to be granted separately for Private Registries.

### Private Registry Permission Example

1\) Click on "Settings" in \[Amazon Elastic Container Registry] for the \[Private registry].

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2Fc2TAm98gj2udHtHJMqNy%2Fimage.png?alt=media&#x26;token=142e26bf-b2f2-422f-bfba-0ce138a7101d" alt=""><figcaption></figcaption></figure>

2\) Click the "Generate Policy" button in the upper right corner of \[Settings] - \[Permissions].

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2Fr6gXKo4WjJpdP2fLQoKq%2Fimage.png?alt=media&#x26;token=ff5407fa-cf82-49a9-a739-d55ac34b0f01" alt=""><figcaption></figcaption></figure>

3\) lick "JSON" in the upper right corner, add the following items, and click "Save Policy" to save.

**Sid**: Permission Name

**Principal**: Specify one or more AWS account IDs to grant permission. Specify more than one account using a comma-separated list.

**Action** : “ecr:\*”

<figure><img src="https://4196990571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL5As9l8R3RbLkQd6XsfL%2Fuploads%2FpfWlH4XP6kZjrfCBj8xV%2Fimage.png?alt=media&#x26;token=038c55ad-b5c5-4ba1-94f9-9826a0bb3999" 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://cocktailcloud.gitbook.io/cocktail-cloud-online-en/start/registry/undefined/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.
