我如何解决尝试删除我的计算环境时在 AWS Batch 中出现的“unresolved issues with your inputs”(输入有未解决的问题)错误?

1 分钟阅读
0

当我尝试删除我的 AWS Batch 计算环境时,我收到以下错误消息:“There are unresolved issues with your inputs.Please review the form and try again.”(您的输入尚有未解决的问题。请查看表单并重试。) 我如何解决此错误并删除我的计算环境?

简短描述

在以下情况下,AWS Batch 会返回 unresolved issues with your inputs(输入有未解决的问题):

  • 不正确的 AWS Identity and Access Management (IAM) 服务角色会导致您的计算环境进入 INVALID 状态。
  • 您的 AWS 账户中不再存在来自只能在创建计算环境时编辑的参数的资源。例如:安全组。

要解决此错误,您必须先确保计算环境处于 VALID 状态。然后,在删除计算环境之前,使用包含所需权限的新服务角色更新计算环境。

解决方法

如果您的计算环境处于 INVALID 状态

1.    按照如何修复 AWS Batch 中的 INVALID 计算环境?中的说明将计算环境移到 VALID 状态。

2.    按照本文的如果您的计算环境处于 VALID 状态部分中的说明进行操作。

如果您的计算环境处于 VALID 状态

**注意:**如果您在运行 AWS Command Line Interface (AWS CLI) 命令时遇到错误,请确保您使用的是最新版的 AWS CLI

1.    通过运行以下 update-compute-environment 命令,使用包含所需权限的新服务角色更新计算环境。

**重要提示:**将 your-aws-region 替换为计算环境的 AWS 区域。将 your-compute-environment-arn 替换为计算环境的 Amazon Resource Name (ARN)。将 your-service-role-arn 替换为您的 AWS Batch 服务 IAM 角色的 ARN。

aws --region your-aws-region batch update-compute-environment --compute-environment your-compute-environment-arn --service-role your-service-role-arn

2.    通过运行以下 update-compute-environment 命令来停用计算环境:

**重要提示:**将 your-aws-region 替换为计算环境的 AWS 区域。将 your-compute-environment-arn 替换为计算环境的 ARN。

aws --region your-aws-region batch update-compute-environment --compute-environment  your-compute-environment-arn --state DISABLED

3.    通过运行以下 delete-compute-environment 命令来删除计算环境:

**重要提示:**将 your-aws-region 替换为计算环境的 AWS 区域。将 your-compute-environment-arn 替换为计算环境的 ARN。

aws --region your-aws-region batch delete-compute-environment --compute-environment your-compute-environment-arn

AWS 官方
AWS 官方已更新 2 年前