0

Summary:

I have an EC2 in public subnet of a VPC that has a internet gateway in its route table. Its connecting well bothways based on routing table. However, I am now trying to reach out to ECR and that leads to "Could not connect to the endpoint URL" message.

What I have tried:

  1. I tried connecting to ECR using access key id and secret access key of permitted user. That doesn't work and leads to "could not connect message"

  2. I then tried creating an end point for both ecr.api and ecr.dkr with default security group and connecting it to subnet where EC2 is located. I realized that this end point is not usual gateway type of endpoint (S3 etc) but an interface. In any case, that also doesn't work and leads to similar message

Code: $(aws ecr get-login --no-include-email --region ap-south-1)

Error:

Could not connect to the endpoint URL: "https://api.ecr.ap-south-1.amazonaws.com/"

Can someone point me in the right direction?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
toing
  • 466
  • 1
  • 3
  • 19
  • The endpoint should be `ecr.ap-south-1.amazonaws.com`. I wonder where it is getting the `api` part? See: [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html) – John Rotenstein May 17 '19 at 22:12
  • Thanks. I am following this link below. There are only two endpoints that i can create corresponding to ECR.. one ends as ecr.api and other ends as ecr.dkr https://aws.amazon.com/blogs/compute/setting-up-aws-privatelink-for-amazon-ecs-and-amazon-ecr/ – toing May 19 '19 at 13:11
  • I am x-linking original question with more details from aws forums [https://forums.aws.amazon.com/thread.jspa?threadID=303505] – toing May 19 '19 at 14:14

0 Answers0