Orchestration with Step Functions: DVA-C03 study notes and practice questions
What to know about Orchestration with Step Functions for the DVA-C03 exam, from the Development with AWS Services domain (30% of the exam guide), then 1 free question to test it. Part of the DVA-C03 study guide.
Step Functions is an orchestration service. In Domain 1, questions give a multi-step process with ordering, errors or human steps and ask which workflow design fits. It is in scope for DVA-C03 under the skill of choosing synchronous and asynchronous patterns.
Standard or Express
Standard workflows run for up to one year and give exactly-once semantics for each state transition, with execution history in the console. They suit long, auditable processes such as approvals.
Express workflows run for up to five minutes and suit high-volume, short event processing. They cannot use the .sync or callback patterns.
If a question requires waiting on a job longer than five minutes, or a human approval, the answer is Standard.
Integration patterns
Request and response: call the service and move on.
.sync: wait for a job, such as a CodeBuild build or an ECS task, to finish.
.waitForTaskToken: pause until an external system returns the task token through SendTaskSuccess or SendTaskFailure. Use it for approvals of unknown length.
Direct service integrations call supported AWS APIs without a Lambda function in between.
Errors and data
Retry runs first, with backoff, for the errors listed. Catch runs only when retries are exhausted or no retry applies. A Catch needs ErrorEquals and Next.
The default ResultPath overwrites the input with the error. Set a path such as $.error to keep the original input and add the error beside it.
Each state’s input and output are limited in size. For large documents, store the file in S3 and pass its key.
Parallel and Map
Scenario wording
State
Run a fixed set of different steps at the same time and wait for all
Parallel
Run the same step for each item in an array
Map
Limit how many items run at once to protect a downstream system
Map with MaxConcurrency
Choose one branch based on a value
Choice
Common traps
Lambda polling in a loop for a long job. Use .sync or a callback.
Express workflows for a process that waits for a human or runs for hours.
Retry on a payment step in a Standard workflow. A retry can repeat the charge, so an idempotency key is needed.
Parallel state for an array of unknown length. Use Map.
Passing large documents between states instead of an S3 reference.
Choosing Step Functions for one quick action. A single Lambda invocation is simpler.
If the call still fails after these retries, the workflow must go to a state named NotifyFailure, and that state must receive the original order input as well as the error.
What should the developer add?
Choose one answer.
AA. A Catch with ErrorEquals LabelServiceUnavailable, ResultPath set to $.error, and Next set to NotifyFailure.
BB. A second Retry entry with ErrorEquals States.ALL, and a Next field that names NotifyFailure.
CC. A Catch with ErrorEquals LabelServiceUnavailable and Next set to NotifyFailure, with no ResultPath.
DD. An on-failure destination on the Lambda function that names NotifyFailure as the target state.
B. Wrong: Retry entries have no Next field. Only a Catch can move the execution to another state.
C. Wrong: This reaches the right state, but the default ResultPath of $ overwrites the whole input with the error output.
D. Wrong: Lambda destinations apply to asynchronous invocations and cannot target a state inside a workflow. The Task state calls the function synchronously.
Explanation
Step Functions tries the Retry first and uses a Catch only when retries are exhausted. A Catch needs ErrorEquals and Next. Its default ResultPath is $, which overwrites the input with the error, so a path such as $.error keeps the original input and adds the error to it.
Want more on Orchestration with Step Functions? The 5 full-length practice sets have 6 more Orchestration with Step Functions questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →