A Step Functions Task state invokes a Lambda function that calls a partner API. The function sometimes fails with RateLimitExceeded, which is transient, and sometimes with InvalidInput, which is permanent. Transient errors must be retried up to five times with increasing delays, and permanent errors must go straight to a notification state. Which configuration meets these requirements?
Show the answer
Correct answerA. A Retry for RateLimitExceeded with IntervalSeconds, BackoffRate 2, and MaxAttempts 5, plus a Catch for InvalidInput that goes to the notification state
AWhy this is right: The Retry applies backoff only to the transient error, and the Catch routes the permanent error to notification immediately.
BWhy not this: Step Functions calls the function synchronously, so asynchronous retry settings and destinations are never used; asynchronous retries are also capped at two.
CWhy not this: Retrying States.ALL also retries InvalidInput five times before it reaches the notification state.
DWhy not this: A queue redrive retries without increasing delays and takes the failure handling out of the workflow.
A Retry scoped to the transient error name retries with exponential backoff, and a Catch for the permanent error sends it to the notification state without retrying. Step Functions invokes Lambda synchronously, so the function's asynchronous retry settings do not apply.