You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过AWS CLI更新AWS AppRunner镜像URI?命令报错求助

修复AWS AppRunner update-service命令错误

你遇到的错误是因为ImageRepository参数的格式不符合AWS CLI的嵌套结构要求,正确写法需要明确指定子参数的键值对。

错误原因

原命令里ImageRepository={clp-ui-qa,some-tag}的写法会被CLI拆解成两个独立选项,导致系统识别到未知的ImageRepository=some-tag参数。AWS CLI要求嵌套结构参数必须以Key={SubKey1=Value1,SubKey2=Value2}的形式定义。

正确命令示例

aws apprunner update-service --service-arn arn:aws:apprunner:us-east-1:*:service/next-js/* --source-configuration ImageRepository={ImageRepositoryType=ECR,ImageIdentifier=clp-ui-qa:some-tag} --region us-east-1

关键说明

  • ImageRepositoryType:必填项,取值为ECR(AWS弹性容器注册表)或ECR_PUBLIC(公共ECR),根据你的镜像仓库类型选择。
  • ImageIdentifier:完整的镜像标识符,格式为仓库名:标签,比如示例中的clp-ui-qa:some-tag。

内容的提问来源于stack exchange,提问作者Nitin k

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 20:03:07