
Answer-first summary for fast verification
Answer: "HelloWorld": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloFunction", "Next": "AfterHelloWorldState", "Comment": "Run the HelloWorld Lambda function" }
Correct option: "HelloWorld": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloFunction", "Next": "AfterHelloWorldState", "Comment": "Run the HelloWorld Lambda function" } A Task state ("Type": "Task") represents a single unit of work performed by a state machine. All work in your state machine is done by tasks. A task performs work by using an activity or an AWS Lambda function, or by passing parameters to the API actions of other services. AWS Step Functions can invoke Lambda functions directly from a task state. A Lambda function is a cloud-native task that runs on AWS Lambda. You can write Lambda functions in a variety of programming languages, using the AWS Management Console or by uploading code to Lambda. Incorrect options: "wait_until" : { "Type": "Wait", "Timestamp": "2016-03-14T01:59:00Z", "Next": "NextState" } A Wait state ("Type": "Wait") delays the state machine from continuing for a specified time. "No-op": { "Type": "Task", "Result": { "x-datum": 0.381018, "y-datum": 622.2269926397355 }, "ResultPath": "$.coords", "Next": "End" } Resource field is a required parameter for Task state. This definition is not of a Task but of type Pass. "FailState": { "Type": "Fail", "Cause": "Invalid response.", "Error": "ErrorA" } A Fail state ("Type": "Fail") stops the execution of the state machine and marks it as a failure unless it is caught by a Catch block. Because Fail states always exit the state machine, they have no Next field and don't require an End field.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
When designing a business workflow using AWS Step Functions, a developer can configure multiple states to control the flow of execution.
Out of the various states available, which one would you consider as representing a single unit of work carried out by the state machine?
A
"HelloWorld": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloFunction", "Next": "AfterHelloWorldState", "Comment": "Run the HelloWorld Lambda function" }
B
"No-op": { "Type": "Task", "Result": { "x-datum": 0.381018, "y-datum": 622.2269926397355 }, "ResultPath": "$.coords", "Next": "End" }
C
"FailState": { "Type": "Fail", "Cause": "Invalid response.", "Error": "ErrorA" }
D
"wait_until" : { "Type": "Wait", "Timestamp": "2016-03-14T01:59:00Z", "Next": "NextState" }