AWS Certified Solutions Architect Professional SAP-C02 Practice Question
An e-commerce company runs three AWS Lambda functions in sequence (ChargePayment ➝ ReserveInventory ➝ GenerateShipment) to process customer orders. Intermittent 5xx errors and timeouts in downstream services occasionally cause the whole workflow to fail.
The operations team needs a more reliable solution that meets these requirements:
Automatically retry transient errors with exponential backoff.
If a step ultimately fails, record the failure and invoke a CompensateOrder Lambda function, without losing the execution history.
Guarantee that each step runs exactly once, even across AWS service disruptions.
Minimize custom code and ongoing operational overhead.
Which approach should a solutions architect recommend?
Add Amazon SQS queues in front of each Lambda function, implement retry logic in the code, and configure dead-letter queues for unprocessed messages.
Use an AWS Step Functions Express state machine to invoke the three Lambda functions and rely on EventBridge automatic retries for failed executions.
Build an AWS Step Functions Standard state machine that invokes each Lambda task. Define Retry with MaxAttempts and BackoffRate for exponential backoff and add a Catch handler that transitions to a CompensateOrder state on failure.
Configure AWS Lambda Destinations to send failed invocations to the CompensateOrder function and use Amazon EventBridge rules to trigger additional retries.
A Step Functions Standard state machine natively provides exactly-once execution semantics and persists state for up to one year, satisfying the reliability requirement. Its built-in Retry field supports configurable IntervalSeconds, MaxAttempts, and BackoffRate, enabling exponential-backoff retries for transient errors. A Catch block can route any unhandled failure to a CompensateOrder state, ensuring the failure is logged while invoking compensation logic and preserving the full execution history.
Express Workflows (Option B) offer only at-least-once execution, so a step can run more than once-unacceptable for payment processing. SQS with custom retry logic (Option C) meets the retry need but requires extra code, does not give a single auditable execution history, and does not guarantee exactly-once semantics. Lambda Destinations plus EventBridge (Option D) handle post-failure routing but provide no step-by-step orchestration or built-in retries with exponential backoff.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are the key differences between Step Functions Standard and Express workflows?
Open an interactive chat with Bash
How does the Retry field in Step Functions enable exponential backoff?
Open an interactive chat with Bash
Why is exactly-once execution critical for payment processing in workflows?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .