AWS Step Functions is a serverless orchestration service for building scalable workflows. Chapter 2 covers essential concepts like workflow types, core state types, state transitions, error handling, and the use of Amazon States Language (ASL). Test your knowledge with these AWS Step Functions MCQ questions and answers to boost your skills.
MCQs: Workflow Types: Standard vs. Express
What is a key difference between Standard and Express workflows in AWS Step Functions? a) Standard workflows have longer execution times than Express b) Express workflows cannot handle errors c) Standard workflows are cheaper for high-volume workloads d) Express workflows do not support retries
Which workflow type is best suited for high-throughput use cases? a) Standard workflows b) Express workflows c) Parallel workflows d) Map workflows
What is the maximum duration for Standard workflows? a) 1 hour b) 12 hours c) 1 year d) 30 days
How does AWS charge for Express workflows? a) Based on the number of state transitions b) Based on the number of tasks c) Based on execution duration and requests d) Flat monthly fee
Which workflow type supports execution history logging in CloudWatch? a) Only Standard workflows b) Only Express workflows c) Both Standard and Express workflows d) Neither supports logging
For which use case is Standard workflow most suitable? a) Real-time analytics b) Long-running workflows with multiple checkpoints c) High-throughput event processing d) Stateless API calls
What is the typical state transition limit for Express workflows? a) Unlimited b) 10,000 per execution c) 1 million per execution d) 100,000 per execution
How does Express workflow manage execution logs by default? a) Stored in DynamoDB b) Written to CloudWatch Logs c) Temporarily stored in memory d) Not stored at all
Which workflow type ensures exactly-once execution? a) Standard workflows b) Express workflows c) Both types ensure exactly-once execution d) Neither type ensures exactly-once execution
What feature differentiates Standard workflows for auditing? a) Step-level execution timestamps b) Real-time log aggregation c) Persistent execution history d) Multi-region replication
MCQs: Core State Types: Task, Choice, Parallel, Map, and Wait
What is the primary use of the Task state in Step Functions? a) To define a choice condition b) To perform a single unit of work c) To wait for a specific time d) To define parallel branches
Which state allows branching logic in workflows? a) Wait b) Parallel c) Choice d) Map
What is the function of the Parallel state? a) To execute multiple branches of work concurrently b) To define wait times between tasks c) To map input data to a specific task d) To retry failed tasks
Which state is used to iterate over a set of items in Step Functions? a) Parallel b) Wait c) Map d) Task
What does the Wait state allow in AWS Step Functions? a) To introduce a delay before proceeding b) To pause execution indefinitely c) To skip state transitions d) To perform asynchronous tasks
What is required for a Choice state to function correctly? a) Task state output b) At least one rule or condition c) A Parallel state d) No additional requirements
Which of these states can handle concurrency? a) Task b) Wait c) Parallel d) Choice
What is the role of a default condition in a Choice state? a) It retries failed tasks b) It handles cases that do not match any defined conditions c) It executes parallel branches d) It triggers error handling
Which state automatically scales with the input dataset size? a) Wait b) Map c) Choice d) Parallel
How does the Map state handle large data sets? a) It processes them sequentially b) It splits them into batches and processes concurrently c) It stores them temporarily in S3 d) It sends them to a Lambda function
MCQs: State Transition Rules and Best Practices
What is the primary purpose of state transition rules in Step Functions? a) To define task execution order b) To log execution details c) To trigger Lambda functions d) To enforce error handling
Which is a recommended best practice for managing state transitions? a) Use Parallel states for all workflows b) Avoid using Wait states c) Keep transitions as simple as possible d) Always use nested workflows
What happens if a state transition has no defined “Next” field? a) The workflow loops indefinitely b) The execution ends at that state c) An error is thrown d) The workflow retries automatically
How can you optimize workflows with multiple decision points? a) Use multiple Map states b) Minimize the use of Choice states c) Use nested workflows d) Avoid using Wait states
What ensures smooth transitions between states? a) Properly defined output and input data b) Persistent storage c) Enabling CloudWatch monitoring d) Using Express workflows
MCQs: Error Handling and Retry Mechanisms
How does Step Functions handle errors in a Task state by default? a) Retries the task automatically b) Terminates the workflow c) Logs the error and proceeds d) Ignores the error
What mechanism allows retries for failed tasks in workflows? a) Retry field in state definition b) Parallel state configuration c) Wait state definition d) Map state execution
What type of errors can a Catch block handle in workflows? a) Application errors only b) State machine definition errors c) Lambda function errors d) All specified error types
How can error handling improve workflow reliability? a) By reducing execution time b) By handling failures and defining fallback states c) By limiting the number of states d) By skipping failed states
What is a fallback state in error handling? a) A state that retries tasks indefinitely b) A state executed when no other state is defined for an error c) A state that logs errors d) A state that triggers alarms
Answers Table
Qno
Answer (Option with Text)
1
a) Standard workflows have longer execution times than Express
2
b) Express workflows
3
d) 30 days
4
c) Based on execution duration and requests
5
c) Both Standard and Express workflows
6
b) Long-running workflows with multiple checkpoints
7
c) 1 million per execution
8
b) Written to CloudWatch Logs
9
a) Standard workflows
10
c) Persistent execution history
11
b) To perform a single unit of work
12
c) Choice
13
a) To execute multiple branches of work concurrently
14
c) Map
15
a) To introduce a delay before proceeding
16
b) At least one rule or condition
17
c) Parallel
18
b) It handles cases that do not match any defined conditions
19
b) Map
20
b) It splits them into batches and processes concurrently
21
a) To define task execution order
22
c) Keep transitions as simple as possible
23
b) The execution ends at that state
24
c) Use nested workflows
25
a) Properly defined output and input data
26
b) Terminates the workflow
27
a) Retry field in state definition
28
d) All specified error types
29
b) By handling failures and defining fallback states
30
b) A state executed when no other state is defined for an error