无法在App Runner上创建或部署服务,因为它无法拉取私有的ECR镜像。

0

【以下的问题经过翻译处理】 我在使用App Runner时遇到了问题。当我尝试使用私有ECR存储库中的镜像创建服务时,它失败了,因为显然无法拉取该镜像。从公共ECR中拉取镜像却可以正常工作。

当我尝试创建服务时,我选择让App Runner为我创建AppRunnerECRAccessRole。然后,在它尝试首次部署时,它会尝试拉取镜像。然后大约45分钟内没有任何动作。然后出现错误消息,无法拉取映像。错误消息令人困惑,因为角色是自动创建的,并且在查看策略时,对我来说看起来是正确的。

ECR存储库和App Runner服务都位于同一区域(eu-west-1)。

部署日志: 2021-11-21T14:02:26.613+01:00 Starting to pull your application image. 2021-11-21T14:42:09.236+01:00 Failed to pull your application image. Be sure you configure your service with a valid access role to your ECR repository.

事件日志: 11-21-2021 02:02:46 PM Successfully created pipeline for automatic deployments. 11-21-2021 02:02:26 PM Service status is set to OPERATION_IN_PROGRESS. 11-21-2021 02:02:26 PM Service creation started.

profile picture
EXPERTE
gefragt vor 2 Jahren31 Aufrufe
1 Antwort
0

【以下的回答经过翻译处理】 问题已解决。

在Kiran_K的提示下,我查看了CloudTrail中的事件,并发现在创建/部署我的服务时,App Runner尝试扮演所提到的AppRunnerECRAccessRole角色。然而,由于以下异常“STS is not activated in this region”,该操作失败。

我根据 https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate 的指示,我在我的区域(eu-west-1)上启用了STS。

这解决了问题,现在创建/部署工作正常进行!

profile picture
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen