CLOUD LABS
Mastering Service Integration Patterns with AWS Step Functions
In this Cloud Lab, you’ll explore how to use AWS Step Functions service integration patterns to handle various job types: short jobs, long-running jobs whose results impact subsequent states, and jobs requiring external verification before transitioning to the next state.
intermediate
Certificate of Completion
Learning Objectives
AWS Step Functions is a serverless orchestration service that lets you coordinate multiple AWS services into fully managed workflows using a state machine. It simplifies building applications by allowing developers to define workflows using a JSON-based language. With AWS Step Functions, you can automate business processes, manage complex microservices architectures, and orchestrate tasks across AWS services using service integration patterns. Service integration patterns of AWS Step Functions provide tailored approaches based on the type of job or task at hand:
Request Response: This is used for tasks that respond immediately to the request. For example, a service calls a Lambda function and waits for its result before proceeding to the next step.
Run a Job: This is used for long-running jobs. It waits for job completion (like an AWS Glue ETL job) and proceeds.
Wait for Callback: This method is used when a task initiates a process and waits for an external entity to send a token when the task completes. It is commonly used with services that require manual approval or multistep processes.
In this Cloud Lab, you’ll use the three service integration patterns in the following way:
You’ll create the S3 bucket in this Cloud Lab and add a data file. You will then create IAM roles that will provide the necessary permissions for the Lambda functions, Glue ETL job, and AWS Step Functions. After that, you will create a Lambda function that checks whether the file is in the S3 bucket. You will create an AWS Glue ETL job to filter out the desired data from the data file in the S3 bucket. Finally, you’ll create a Lambda function that validates the transformations in the data.
After creating the necessary resources, you’ll create a state machine in AWS Step Functions and use the service integration patterns in the following three ways, as shown in the architecture diagram above:
First, you will use the Request Response service integration pattern for all the states. However, this approach will fail as the Glue ETL job takes longer to execute, and the state machine does not wait for its completion.
Afterward, you will use the Run a Job service integration pattern with the AWS Glue ETL job to transform the data. The Run a Job service integration pattern waits for the job to complete and switches the state machine to the next state only when we get results.
Finally, we will remove the ETL job from the state machine and run it externally. We will use the Wait for Callback service integration pattern for the Lambda function, which checks the file’s presence to hold its output to the next state. We will run the Glue ETL job externally and then, after its completion, manually verify whether the task has been completed successfully for the state machine to switch to the next state.
Before you start...
Try these optional labs before starting this lab.
Relevant Courses
Use the following content to review prerequisites or explore specific concepts in detail.
Trusted by 1.4 million developers working at companies including
Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

I highly recommend Educative. The courses are well organized and easy to understand.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

I highly recommend Educative. The courses are well organized and easy to understand.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Get access to Educative Cloud Labs
Copyright ©2025 Educative, Inc. All rights reserved.