Automation with Lambda and Step Functions: DOP-C02 study notes and practice questions
What to know about Automation with Lambda and Step Functions for the DOP-C02 exam, from the Configuration Management and IaC domain (17% of the exam guide), then 1 free question to test it. Part of the DOP-C02 study guide.
A logistics company automates the onboarding of new warehouse robots. Each onboarding runs about 90 minutes and calls several internal systems, and it must pause until a site engineer approves the robot's configuration in the company's ticketing system.
The workflow must not run a step twice if it is retried, and the operations team needs to see the status and history of each onboarding in the console for at least 60 days after it finishes. Today a single Lambda function is triggered by a queue and polls the ticketing system every minute, which makes the process hard to follow.
The company wants the approval to resume the workflow when the engineer responds, with the least custom polling code.
Which design meets these requirements?
Choose one answer.
AA. Run the onboarding in an AWS Step Functions Express workflow that calls the ticketing system and waits for the approval by polling a status endpoint in a loop.
BB. Keep the queue-triggered Lambda function, and have it write its progress to an Amazon DynamoDB table so the team can query each onboarding, with the polling interval reduced to 10 seconds.
CC. Run the onboarding as a Standard Step Functions workflow that pauses at a callback task with a task token, and resumes when the engineer's response calls SendTaskSuccess.
DD. Use an Amazon EventBridge Scheduler schedule that starts the onboarding Lambda function every minute, and have the function check the ticketing system for an approval before it continues.
Show the answer and explanation
Answer: C
A. Wrong: Express workflows can run for at most five minutes, so a 90-minute onboarding cannot finish in one, and they do not keep execution history in the Step Functions console. Polling in a loop is also the custom code the company wanted to remove. Learn more: Choosing workflow type in Step Functions (opens in a new tab)
B. Wrong: The team would still build and run the polling and the state tracking itself. Retries could also repeat steps, since the function has no built-in record of which steps completed.
C. Right: Correct. Standard workflows can run for up to a year and keep their execution history for 90 days after they close, and a callback task with a task token pauses without polling until the approval returns. Standard workflows also provide exactly-once workflow execution. Learn more: Choosing workflow type in Step Functions (opens in a new tab)
A Standard Step Functions workflow can run for the full 90 minutes, keeps its execution history for 90 days after it closes, and can pause at a callback task that waits for a task token. The engineer's response resumes the workflow with SendTaskSuccess, so no polling code is needed. Express workflows are limited to five minutes, and polling functions and scheduled checks keep the polling and lack the history.
Want more on Automation with Lambda and Step Functions? The 5 full-length practice sets have 5 more Automation with Lambda and Step Functions questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →