Correct Answer – C
Any state under step functions can encounter runtime errors. Errors can happen for various reasons:
Task failures (for example, an exception in a Lambda function)
AWS Lambda can occasionally experience transient service errors. In this case, invoking Lambda results in a 500 error, such as
ServiceException
,
AWSLambdaException
, or
SdkClientException
.
By default, when a state reports an error, AWS Step Functions causes the execution to fail entirely.
For errors such as “ServiceException”, the best practice is to Retry invoking the Lambda function. Within a Retry Code, the “ErrorEquals” field is the required string that matches error names & all other fields are optional.
Option A is incorrect as the Lambda Catch code is only used after the function performs several retries and ErrorEquals & Next are required strings.
Option B is incorrect as the BackoffRate field is optional in Lambda Retry code & if not specified, the default value of 2.0 is considered.
Option D is incorrect as the Lambda Catch code is only used after the function performs several retries. ResultPath is an optional field in a Catch Code, ErrorEquals & Next are required strings.
For more information on troubleshooting Lambda Function errors, refer to the following URL-
https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html
https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html