

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS CodeDeploy 的错误代码
<a name="error-codes"></a>

本主题提供有关 CodeDeploy 错误的参考信息。


****  

| 错误代码 | 描述 | 
| --- | --- | 
| `AGENT_ISSUE` |  部署因 CodeDeploy 代理出现问题而失败。确保此代理已安装并在该部署组中的所有实例上运行。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `AUTO_SCALING_IAM_ROLE_PERMISSIONS` |  与您的部署组关联的服务角色不具备在以下 AWS 服务中执行操作所需的权限。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `HEALTH_CONSTRAINTS` |  总体部署因以下原因而失败：过多的独立实例部署遭失败、可供部署的正常实例太少或您的部署组中的一些实例遇到问题。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `HEALTH_CONSTRAINTS_INVALID` |  由于部署配置所定义的最小数目的正常运行的实例不可用，因此部署无法开始。您可通过更新部署配置来减少所需的正常运行的实例数或增加此部署组中的实例数。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `IAM_ROLE_MISSING` |  由于不存在具有为部署组指定的服务角色名称的服务角色，因此部署失败。确保您使用的是正确的服务角色名称。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `IAM_ROLE_PERMISSIONS` |  CodeDeploy 没有代入角色所需的权限，或者您正在使用的 IAM 角色未为您提供在 AWS 服务中执行操作的权限。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `NO_INSTANCES` |   这可能是由于下列原因之一导致的。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html) 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `OVER_MAX_INSTANCES` |  由于为部署定向的实例数超出您的账户允许的数量，因此部署失败。要减少为此部署定向的实例数，请更新此部署组的标签设置或删除一些定向实例。或者，您可联系 AWS 支持 以请求提高限制。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `THROTTLED` |  由于 IAM 角色发出的请求的数目超出 AWS CodeDeploy 允许的数目，因此部署失败。尝试减少请求数。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 
| `UNABLE_TO_SEND_ASG` |  由于部署组未使用其 Amazon EC2 Auto Scaling 组正确配置，因此部署失败。在 CodeDeploy 控制台中，从部署组中删除 Amazon EC2 Auto Scaling 组，然后重新添加此组。 了解更多： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/codedeploy/latest/userguide/error-codes.html)  | 

## 相关主题
<a name="error-codes-related-topics"></a>

[故障排除 CodeDeploy](troubleshooting.md)