Q33 — AWS DVA-C02 Ch.2

Question 33 of 100 | ← Chapter 2

A developer is building a serverless application on AWS to process large volumes of data in a workflow. Within the workflow, an AWS Step Functions state machine invokes several AWS Lambda functions. One of the Lambda functions occasionally fails with a timeout error during execution. The developer must ensure that if a timeout error occurs, the workflow automatically retries the failed function invocation. Which solution meets this requirement?

Correct Answer: A. Add a Retry field in the Step Functions state machine definition. Configure the state machine to specify the maximum number of retries and the timeout error type to retry.

Explanation

Option A allows developers to define a retry policy directly within the Step Functions state machine definition, ensuring automatic retries of failed function invocations upon timeout errors. By configuring the maximum retry count and specifying the error types to retry (e.g., States.Timeout), developers can robustly handle transient failures without custom infrastructure or external services.