Call other AWS services - AWS Step Functions

Call other AWS services

AWS Step Functions integrates with AWS services, letting you call each service's API actions from your workflow. You can use Step Functions' AWS SDK integrations to call any of the over two hundred AWS services directly from your state machine, giving you access to over nine thousand API actions. Or you can use Step Functions' Optimized integrations, each of which has been customized to provide special functionality for your workflow. Some API actions are available in both types of integration. In this case, it's recommended that you use the Optimized integration.

You coordinate these services directly from a Task state in the Amazon States Language. For example, using Step Functions, you can call other services to:

  • Invoke an AWS Lambda function.

  • Run an AWS Batch job and then perform different actions based on the results.

  • Insert or get an item from Amazon DynamoDB.

  • Run an Amazon Elastic Container Service (Amazon ECS) task and wait for it to complete.

  • Publish to a topic in Amazon Simple Notification Service (Amazon SNS).

  • Send a message in Amazon Simple Queue Service (Amazon SQS).

  • Manage a job for AWS Glue or Amazon SageMaker.

  • Build workflows for executing Amazon EMR jobs.

  • Launch an AWS Step Functions workflow execution.

Optimized integrations

Optimized integrations have been customized by Step Functions to provide special functionality for a workflow context. For example, Lambda Invoke converts its API output from an escaped JSON to a JSON object. AWS BatchSubmitJob lets you pause execution until the job is complete. The first set of optimized integrations was released in 2018, and there are now over fifty APIs.

AWS SDK integrations

AWS SDK integrations work exactly like a standard API call using the AWS SDK. They provide the ability to call over nine thousand APIs across the more than two hundred AWS services directly from your state machine definition. AWS SDK integrations were released in 2021.

Integration pattern support

Standard Workflows and Express Workflows support the same integrations but do not support the same integration patterns. Express Workflows do not support Run a Job (.sync) or Wait for Callback (.waitForTaskToken). Optimized integrations pattern support is different for each integration. For more information, see Standard vs. Express Workflows.

Standard Workflows
Supported service integrations
Service Request Response Run a Job (.sync) Wait for Callback (.waitForTaskToken)
Optimized integrations Lambda
AWS Batch
Amazon ECS/AWS Fargate
Amazon SNS
Amazon SQS
AWS Glue
Amazon EMR
Amazon EMR on EKS
Amazon EMR Serverless
Amazon EKS
API Gateway
AWS Glue DataBrew
Amazon EventBridge
AWS Step Functions
AWS SDK integrations Over two hundred
Express Workflows

Cross-account access

Step Functions provides cross-account access to resources configured in different AWS accounts in your workflows. Using Step Functions service integrations, you can invoke any cross-account AWS resource even if that AWS service doesn’t support resource-based policies or cross-account calls.

For more information, see Accessing resources in other AWS accounts in your workflows.