amazon web services - How to make 'aws ecr get-login' across regions? -
i have docker registry in aws ecr in region 'us-east-1'. works fine on ec2 instances launched in 'us-east-1'. when launch instance in 'eu-central-1' , try run
$(aws ecr get-login --region us-east-1)
i following response
error response daemon: https://acc-id.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request canceled (client.timeout exceeded while awaiting headers)
if run
aws ecr get-login --region us-east-1
i see following response
docker login -u aws -p xxxx -e none https://acc_id.dkr.ecr.us-east-1.amazonaws.com
ec2 instance has following policy iam-role:
"effect": "allow", "action": [ "ecr:getauthorizationtoken", "ecr:batchchecklayeravailability", "ecr:getdownloadurlforlayer", "ecr:getrepositorypolicy", "ecr:describerepositories", "ecr:listimages", "ecr:batchgetimage", "ecr:initiatelayerupload", "ecr:uploadlayerpart", "ecr:completelayerupload", "ecr:putimage" ], "resource": "*" }
please tell me how can have cross-region ecr accessibility.
Comments
Post a Comment