Course menuDOP-C02

Exams / DOP-C02 / Study guide / Automation with Lambda and Step Functions

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.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

These questions ask how to automate a multi-step operational task reliably, often with waits, approvals or retries.

Step Functions

Standard Express
Duration Up to one year Up to five minutes
Execution semantics Exactly-once At-least-once (async) or at-most-once (sync)
History Kept 90 days after closing, visible in the console Sent to CloudWatch Logs
Fits Long-running, auditable workflows High-volume, short event processing
  • Callback tasks (.waitForTaskToken) pause until something returns the task token, such as a human approval.
  • Retry and Catch fields handle errors with backoff.
  • Direct service integrations call 200+ AWS services without Lambda; .sync waits for jobs (such as CodeBuild or ECS tasks) to finish.
  • Map state processes items in parallel; distributed map handles millions of S3 objects.
  • Wait states pause for a time.

Lambda for automation

  • Up to 15 minutes per invocation; longer work belongs in Step Functions or containers.
  • Triggered by EventBridge rules and schedules, SNS, SQS and more.
  • Asynchronous invocations retry twice by default; configure retries, maximum event age, on-failure destinations or a dead-letter queue.
  • Reserved concurrency limits impact on downstream systems.

Choosing

  • One quick action on an event: Lambda.
  • Several steps, waits, approvals, retries and audit history: Step Functions Standard.
  • A runbook acting on instances and AWS resources: Systems Manager Automation.

Common traps

  • Lambda polling in a loop for a long job.
  • Express workflows for a 90-minute process.
  • A cron server to run checks when EventBridge Scheduler does it.

Try the 1 practice question

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.

  1. A. 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.
  2. B. 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.
  3. C. 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.
  4. D. 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)
  • D. Wrong: A schedule that starts a function every minute keeps the polling loop in place and adds more invocations. It still has no built-in execution history or pause and resume for the approval. Learn more: Invoke a Lambda function on a schedule (opens in a new tab)

Explanation

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.

Study

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

Study Automation with Lambda and Step Functions

More Configuration Management and IaC topics