Skip to main content

These questions are independently created for study purposes. They are not official AWS exam questions, actual exam questions, leaked questions, or exam dumps.

SAA-C03Resilient ArchitecturesDifficulty:Normal

SAA-043

You have a batch process that runs five Lambda functions in sequence, currently chained so that each function invokes the next one directly. When it fails partway through, it is difficult to trace which step failed and to re-run only the failed step. Which improvement is the most appropriate?

Choices

Explanation and answer

Read the explanation and correct answer (spoiler — try answering first)

Correct answer: A. Define the workflow as an AWS Step Functions state machine and configure Retry and Catch on each state

Explanation

AWS Step Functions defines each step of a workflow as a state and visualizes it as execution history. Because you can declaratively configure Retry (retries with backoff) and Catch (branching on error) per state, tracing where a failure occurred and re-running parts of the workflow become easy.

Per-choice explanations

A. Define the workflow as an AWS Step Functions state machine and configure Retry and Catch on each state

Correct. You can identify the failed state from the execution history graph, and Retry / Catch let you declaratively write automatic recovery from transient failures and compensating actions on failure.

B. Consolidate the five operations into a single Lambda function and implement error handling with try-catch inside the function

Incorrect. Consolidating into a single function makes it easy to hit the execution time limit (15 minutes maximum), and a failure means starting over from the beginning. It also does not improve visibility into which step failed.

C. Chain the function invocations with Amazon SQS queues and let failed messages be redelivered after the visibility timeout expires

Incorrect. Chaining with SQS does provide loose coupling, but the workflow as a whole has no state for how far it has progressed, and branching, parallel execution, and per-step re-runs must all be implemented yourself.

D. Trigger each function in order with Amazon EventBridge rules and output failure events to CloudWatch Logs

Incorrect. EventBridge is responsible for delivering events; it does not manage workflow state or control retries at the step level. Even if failures are recorded, controlling re-runs must be built yourself.

Practical Use

AWS Step Functions is an orchestration service that defines multiple service calls as a state machine and has the service manage its execution state. State types include Task (calling Lambda or other services), Choice (conditional branching), Parallel (parallel execution), Map (iteration over an array), Wait, and Fail / Succeed, described in a JSON-based definition called the Amazon States Language. Because each Task can declaratively specify Retry (retry count, interval, and backoff rate per error type) and Catch (the state to transition to on error), retry and rollback logic can be separated from application code. A chain in which one Lambda function directly invokes the next works while it is small but quickly becomes unmanageable as steps increase. Because the overall progress is not stored anywhere, identifying the failure point is difficult, and resuming from the middle must be built yourself. There is also the waste that the calling Lambda continues to be billed while it waits for the callee to finish. Moving to Step Functions leaves a history per execution, lets you identify the failed state at a glance in the console graph, and makes re-running with substituted input easy. There are two workflow types: Standard (up to 1 year, strict per-execution history, billed per state transition) and Express (up to 5 minutes, high throughput, billed by execution time and memory). Choose Standard for long-running business workflows and Express for large volumes of short event processing. On SAA-C03, requirements such as "run multi-step processing in order," "trace which step failed," and "build in retries and error handling" make Step Functions the correct answer. Distractors include consolidating into Lambda, chaining with SQS, and chaining with EventBridge. The distinction that SQS and EventBridge are responsible for loosely coupled message delivery and do not manage workflow state is the deciding factor.

Related links