Incident and Event Response

An EC2 CodeDeploy deployment fails during ApplicationStop, and a corrected script in the new revision does not change the failure because CodeDeploy still executes the last successfully deployed revision's script. Operations approves bypassing this obsolete stop script once, but requires normal hook execution afterward; what should the engineer do?

Show the answer

Correct answerD. Retry with ApplicationStop failures ignored and deploy the corrected hook successfully.

AWhy not this: Excluding failed instances does not repair the previous revision's stop hook or establish the corrected revision as the baseline.

BWhy not this: Changing the incoming revision's timeout does not modify the ApplicationStop script being executed from the previous revision.

CWhy not this: The incoming revision's hook definitions do not determine which ApplicationStop script executes during this attempt.

DWhy this is right: Ignoring the obsolete stop-hook failure allows the corrected revision to become the source of hooks for subsequent deployments.

CodeDeploy runs ApplicationStop from the last successful revision. Ignoring its failure allows the corrected revision to become the successful baseline for later deployments. Removing the hook from the incoming revision does not change the stop hook used for this attempt.