SDLC Automation

An EC2 application uses CodeDeploy, and a CloudWatch alarm detects elevated application errors during deployment. Which configuration automatically restores the last known good revision when the alarm enters ALARM?

Show the answer

Correct answerA. Attach the alarm and enable automatic rollback when a deployment stops on an alarm

AWhy this is right: The alarm stops the deployment, and the matching automatic rollback event triggers redeployment of the last known good revision.

BWhy not this: Notifications report events but do not perform a rollback without additional automation.

CWhy not this: Stopping prevents further deployment activity but does not automatically restore the previous revision.

DWhy not this: Failure-triggered rollback alone does not make CodeDeploy monitor or respond to the application alarm.

CodeDeploy must monitor the alarm and have automatic rollback enabled for deployments stopped by alarms. Stopping a deployment alone does not redeploy the last known good revision.