A developer is building a serverless application on AWS for a workflow that processes high volumes of data. In the workflow, an AWS Step Functions state machine invokes several AWS Lambda functions. One of the Lambda functions occasionally fails because of timeout errors during periods of high demand. The developer must ensure that the workflow automatically retries the failed function invocation if a timeout error occurs. Which solution will meet this requirement?
- AAdd a Retry field in the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts and the timeout error type to retry on. (correct answer)
- BAdd a Timeout field in the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts.
- CAdd a Fail state to the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts.
- DUpdate the Step Functions state machine to pass the invocation request to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe a Lambda function to the SNS topic. Configure the Lambda function with the maximum number of retry attempts for a timeout error type.
Reveal answer & explanationHide answer
The correct answer is A. Option A: Add a Retry field in the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts and the timeout error type to retry on.
Explanation
AWS Step Functions coordinates multi-step workflows as a managed state machine. AWS Config tracks resource configuration changes and evaluates compliance.