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?
- 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. ✓
- B. Add a Timeout field in the Step Functions state machine definition. Configure the state machine to specify the maximum number of retries.
- C. Add a Fail state in the Step Functions state machine definition. Configure the state machine to specify the maximum number of retries.
- D. Update the Step Functions state machine to send the invocation request to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe a Lambda function to the SNS topic. Configure the Lambda function’s maximum retry count for the timeout error type.
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.