Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Create a messenger application with Step Functions

Focus mode
Create a messenger application with Step Functions - Amazon DynamoDB

The following code example shows how to create an AWS Step Functions messenger application that retrieves message records from a database table.

Python
SDK for Python (Boto3)

Shows how to use the AWS SDK for Python (Boto3) with AWS Step Functions to create a messenger application that retrieves message records from an Amazon DynamoDB table and sends them with Amazon Simple Queue Service (Amazon SQS). The state machine integrates with an AWS Lambda function to scan the database for unsent messages.

  • Create a state machine that retrieves and updates message records from an Amazon DynamoDB table.

  • Update the state machine definition to also send messages to Amazon Simple Queue Service (Amazon SQS).

  • Start and stop state machine runs.

  • Connect to Lambda, DynamoDB, and Amazon SQS from a state machine by using service integrations.

For complete source code and instructions on how to set up and run, see the full example on GitHub.

Services used in this example
  • DynamoDB

  • Lambda

  • Amazon SQS

  • Step Functions

SDK for Python (Boto3)

Shows how to use the AWS SDK for Python (Boto3) with AWS Step Functions to create a messenger application that retrieves message records from an Amazon DynamoDB table and sends them with Amazon Simple Queue Service (Amazon SQS). The state machine integrates with an AWS Lambda function to scan the database for unsent messages.

  • Create a state machine that retrieves and updates message records from an Amazon DynamoDB table.

  • Update the state machine definition to also send messages to Amazon Simple Queue Service (Amazon SQS).

  • Start and stop state machine runs.

  • Connect to Lambda, DynamoDB, and Amazon SQS from a state machine by using service integrations.

For complete source code and instructions on how to set up and run, see the full example on GitHub.

Services used in this example
  • DynamoDB

  • Lambda

  • Amazon SQS

  • Step Functions

For a complete list of AWS SDK developer guides and code examples, see Using DynamoDB with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.