AWS Certified Developer – Associate (DVA-C02) — Question 434
A developer needs to fix an AWS CodeDeploy deployment that failed. During the failed deployment, the developer received the following error message:
“The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems. (Error code: HEALTH-CONSTRAINTS)”
What are the possible causes of the failed deployment? (Choose two.)
Answer options
- A. The CodeDeploy agent was not running on the instances that CodeDeploy was trying to deploy to.
- B. The unified Amazon CloudWatch agent was not running on the instances that CodeDeploy was trying to deploy to.
- C. The developer’s IAM role did not have the necessary permissions to perform code deployment to the instances.
- D. CodeDeploy was trying to deploy to instances that were attached to an IAM instance profile that did not have the required permissions.
- E. CodeDeploy was trying to deploy to instances that were not set up with correct CodeDeploy health checks.
Correct answer: A, E
Explanation
The HEALTH-CONSTRAINTS error occurs when the deployment fails to meet the minimum healthy host requirements defined in the deployment configuration. This typically happens if the CodeDeploy agent is not running on the target instances to receive the deployment instructions, or if the instances fail to pass the established health checks during the deployment lifecycle. Other options, such as missing CloudWatch agents or developer IAM role permissions, do not directly cause this instance-level health constraint failure.