
Service integration patterns are the foundational mechanisms through which Step Functions integrates with AWS services. This chapter gives you a basic understanding of available service integration patterns and different ways Step Functions integrates with AWS services.
Request Response
Request Response integration calls an API of a service and lets Step Functions progress to the next state immediately after it gets the HTTP response. Popular integrations include invoking Amazon Lambda functions, sending an Amazon EventBridge events, and sending a message to an Amazon SQS queue. You can learn more about Request Response pattern here.
Run a Job (.sync)
Run a Job integration calls an API of a service and waits for the job behind the API to complete. For instance, when submitting an AWS Batch job using Run a Job integration, the Step Functions task waits for the batch job to complete before moving to the downstream tasks. Popular integrations include submitting an AWS Batch SubmitJob, AWS Glue StartJobRun and Amazon ECS RunTask. You can learn more about Run a Job pattern here.
Wait for a Callback with a task token
Wait for a Callback integration calls an API of a service with a special token and then pauses the workflow until the task token is returned. This integration is widely used for use cases that involves human approval process and external systems. You can learn more about Wait for a Callback with a task token pattern here.
AWS SDK service integrations
You can use Step Functions' AWS SDK integrations to call almost any AWS service API actions from your state machine. Recently released services may not have SDK integrations available until a later update. SDK service integrations can use either Request Response or Wait for a Callback pattern. Run a Job integrations is available only with optimized integrations. You can use SDK service integrations to read an Amazon S3 Object, start an AWS Athena query, or call almost any AWS service APIs.
Optimized integrations
Optimized integrations are available for a subset of services such as AWS Lambda, AWS Batch, and Amazon ECS/AWS Fargate. All three service integration patterns are applicable to optimized integrations. To see the full list of services supported by optimized integrations, visit the documentation.
To learn more about the integration patterns, visit the documentation