Orchestrate Queue-based Microservices

with AWS Step Functions and Amazon SQS


In this tutorial, you will learn how to use AWS Step Functions and Amazon SQS to design and run a serverless workflow that orchestrates a message queue-based microservice. Step Functions is a serverless orchestration service that lets you easily coordinate multiple AWS services into flexible workflows that are easy to debug and easy to change. Amazon SQS is the AWS service that allows application components to communicate in the cloud.

This tutorial will simulate inventory verification requests from incoming orders in an e-commerce application as part of an order processing workflow. Step Functions will send inventory verification requests to a queue on SQS. An AWS Lambda function will act as your inventory microservice that uses a queue to buffer requests. When it retrieves a request, it will check inventory and then return the result to Step Functions. When a task in Step Functions is configured this way, it is called a callback pattern. Callback patterns allow you to integrate asynchronous tasks in your workflow, such as the inventory verification microservice of this tutorial.

 AWS Experience


 Time to Complete

10 minutes

 Cost to Complete

Free Tier

 Services Used

This Tutorial
Requires an AWS Account

There are no additional charges for AWS Step Functions or Amazon SQS. The resources you create in this tutorial are Free Tier eligible.

View AWS Free Tier Details »


Was this tutorial helpful?


You have orchestrated a microservice in the cloud with a message queue using AWS Step Functions and Amazon SQS. Step Functions is a great fit when you need to coordinate your application resources where productivity and agility are key considerations.