Files
floci/src/main
Niels Kootstra d167cc5bf3 fix(codedeploy): fail closed on unreachable, erroring, or timed-out lifecycle hooks (#3563)
* fix(codedeploy): fail closed on unreachable, erroring, or timed-out lifecycle hooks

CodeDeploy lifecycle hooks failed open in several cases: a missing SSM
instance, an SSM execution exception, a Lambda invoke() error, and a hook
callback timeout were all silently treated as a successful hook. This
makes all of those cases finish the lifecycle event as Failed with an
AWS-compatible Diagnostics.errorCode and ErrorInformation.code
(HEALTH_CONSTRAINTS for Server, HOOK_EXECUTION_FAILURE for Lambda/ECS),
instead of swallowing the error and continuing.

invokeHook now polls a stop flag while waiting on a hook callback, so
StopDeployment interrupts that wait promptly instead of only after the
one-hour callback timeout elapses. A hook function that returns cleanly
without ever calling PutLifecycleEventHookExecutionStatus no longer
succeeds implicitly; it must explicitly call back, matching AWS's
documented AppSpec hooks contract.

* fix(codedeploy): poll SSM hook scripts for their declared timeout

* chore: rerun CI
2026-09-14 15:54:49 -04:00
..