Call other Amazon services - Amazon Step Functions
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Call other Amazon services

With Amazon service integrations, you can call API actions and coordinate executions directly from your workflow. You can use Step Functions' Amazon SDK integrations to call any of the over two hundred Amazon 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. When possible, we recommend using 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 Amazon Lambda function.

  • Run an Amazon 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 Amazon Glue or Amazon SageMaker.

  • Build workflows for executing Amazon EMR jobs.

  • Launch an Amazon 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. Amazon 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.

Amazon SDK integrations

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

Integration pattern support

Standard Workflows and Express Workflows support the same integrations but not the same integration patterns.

  • Optimized integrations pattern support is different for each integration.

  • Express Workflows do not support Run a Job (.sync) or Wait for Callback (.waitForTaskToken).

  • 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 Amazon API Gateway
Amazon Athena
Amazon Batch
Amazon Bedrock
Amazon CodeBuild
Amazon DynamoDB
Amazon ECS/Fargate
Amazon EKS
Amazon EMR
Amazon EMR on EKS
Amazon EMR Serverless
Amazon EventBridge
Amazon Glue
Amazon Glue DataBrew
Amazon Lambda
AWS Elemental MediaConvert
Amazon SageMaker
Amazon SNS
Amazon SQS
Amazon Step Functions
Amazon SDK integrations Over two hundred
Express Workflows

Cross-account access

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

For more information, see Accessing resources in other Amazon Web Services accounts in your workflows.