...

/

Create a State Machine with a Callback Pattern

Create a State Machine with a Callback Pattern

Learn about the callback pattern in AWS Step Functions.

In this lesson, we will focus on creating a state machine with the callback pattern.

The callback pattern

The callback pattern in AWS Step Functions is like a delivery service that requires signature confirmation. When a delivery arrives, the recipient is notified and must provide their signature to confirm receipt. Similarly, in Step Functions, the callback pattern is a way for a state to wait for an external process to complete and provide a token to confirm that it has finished.

Let's break it down using an analogy and then provide an advanced example.

Analogy: Imagine we are running an art event, and we have several tasks to complete before the event can begin:

  • Set up the venue.

  • Arrange catering. ...