Create a messenger application with Step Functions - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Create a messenger application with Step Functions

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