如何跨组织或跨账户拉取ECR镜像

0

【以下的问题经过翻译处理】 你好,

我有AWS组织/多个账户。ECR镜像位于一个组织账户上,需要将这些ECR镜像拉取到另一个组织账户的ECS中。尝试此操作时出现错误“Cannotpullcontainererror: pull image manifest has been retried 1 time(s): failed to resolve ref 189426755769.dkr.ecr.eu-west-2.amazonaws.com/ecr-dev-apps:1.0.0: pulling from host 123456789.dkr.ecr.eu-west-2.amazonaws.com failed with status code [manifests 1.0.0]: 403 Forbidden"

我找不到任何关于如何满足这个需求的文档或指南。有人可以对此提出建议吗?谢谢。

profile picture
EXPERT
asked 6 months ago19 views
1 Answer
0

【以下的回答经过翻译处理】 您可以将镜像推送到另一个账户中的 Amazon ECR 存储库或从中拉取图像。首先,您必须创建一个策略,允许辅助账户对存储库执行API调用。然后,使用从辅助账户生成的Docker身份验证令牌,在对主账户的存储库执行推送和拉取命令。

更多信息:https://aws.amazon.com/premiumsupport/knowledge-center/secondary-account-access-ecr/

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions