SDLC Automation

A CodePipeline Step Functions invoke action runs a Standard workflow that provisions a test environment, invokes tests, and deletes the environment. Failed assertions arrive as a successful task response containing passed=false; how should the workflow block promotion while still attempting cleanup after assertion failures or task errors?

Show the answer

Correct answerA. Check passed with a Choice state, catch task errors, perform cleanup, and route unsuccessful outcomes to a Fail state

AWhy this is right: Choice handles failed assertions, Catch handles task errors, and a terminal failure blocks promotion after cleanup.

BWhy not this: Retries address transient errors but do not replace assertion evaluation or unsuccessful execution status.

CWhy not this: Catching an error and ending successfully hides test failure from the pipeline action.

DWhy not this: Entering a Fail state terminates execution, so cleanup on the success path cannot handle failed tests.

The workflow must evaluate assertion results as well as catch task errors, attempt cleanup, and end unsuccessfully for failed tests. A successful execution containing passed=false is still a successful workflow execution and does not itself block promotion.