Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure custom domain name for Amazon ECR

Amazon Elastic Container Repositories (ECR) have quite human-unfriendly URIs, like 99999999999.dkr.ecr.eu-west-1.amazonaws.com. Is it at all possible to configure custom domain name for an ECR?

Simplistic solution would be to create a CNAME record to point to the ECR URI, but this doesn't really work (SSL certificate doesn't match the domain name, passwords generated by aws ecr get-login don't pass, cannot push images tagged with custom domain name...).

Are there other options?

like image 719
Timur Avatar asked Jun 01 '18 08:06

Timur


People also ask

How do I add my own domain to AWS?

Sign in to the AWS Management Console and open the Amplify console . Choose your app that you want to add a custom domain to. In the navigation pane, choose App Settings, Domain management. On the Domain management page, choose Add domain.

How do I authenticate with Amazon ECR?

To authenticate Docker to an Amazon ECR registry with get-login-password, run the aws ecr get-login-password command. When passing the authentication token to the docker login command, use the value AWS for the username and specify the Amazon ECR registry URI you want to authenticate to.

What is the difference between ECS and ECR?

The primary difference between Amazon ECR and ECS is that while ECR provides the repository that stores all code that has been written and packaged as a Docker image, the ECS takes these files and actively uses them in the deployment of applications.

What domain names do I need to set up custom domain names?

You must have a registered internet domain name in order to set up custom domain names for your APIs. If needed, you can register an internet domain using Amazon Route 53 or using a third-party domain registrar of your choice.

How do I create a custom domain name for a regional API?

When you create a custom domain name for a regional API, API Gateway creates a regional domain name for the API. You must set up a DNS record to map the custom domain name to the regional domain name for API requests bound for the custom domain name to be routed to API Gateway through the mapped regional API endpoint.

What are the ACM requirements for custom domain names and APIs?

For an edge-optimized custom domain name, the ACM certificate must be in the following Region: US East (N. Virginia) (us-east-1). For a Regional custom domain name, the ACM certificate must be in the same Region as your API. For REST APIs, follow the instructions in Setting up custom domain names for REST APIs.

How do I use an AWS managed certificate for a domain?

Each certificate stored in ACM is identified by its ARN. To use an AWS managed certificate for a domain name, you simply reference its ARN. ACM makes it straightforward to set up and use a custom domain name for an API.


1 Answers

Unfortunately, AWS does not support custom domain names for ECR. You'll have to make do with the auto-generated ones for now. There are 'hacks' about, which centre around Nginx proxies, but it really isn't worth the effort.

like image 145
Adam Thomason Avatar answered Sep 19 '22 17:09

Adam Thomason