A serverless workflow uses AWS Step Functions to invoke several Lambda functions. One Lambda intermittently times out during high load. The developer wants the workflow to automatically retry that function when a timeout error occurs. What change will accomplish this?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a Retry field to the Step Functions state definition, specifying the maximum retry attempts and the timeout error type to retry on..
Why this is the answer
AWS Step Functions provides built-in error handling and retry mechanisms. By adding a Retry field to the state definition of the Lambda function that is timing out, you can specify which error types (like Lambda.Timeout or States.Timeout) should trigger a retry, along with parameters such as MaxAttempts, IntervalSeconds, and BackoffRate. This directly addresses the requirement for automatic retries on timeout errors. The other options are incorrect because: Adding a Timeout field to the state definition primarily controls how long the state is allowed to run before it times out, not how many times it retries. A Fail state terminates the workflow execution, which is the opposite of retrying. Using an SNS topic and a separate Lambda for retries introduces unnecessary complexity and doesn't leverage Step Functions' native retry capabilities.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed