Questions tagged [aws-step-functions]

AWS Step Functions is a visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning (ML) pipelines.

AWS Step Functions

AWS Step Functions is a visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning (ML) pipelines.

Workflows

A workflow describes how people get work done from start to finish. A workflow consists of the steps and states in a process. Workflows can appear as a series of steps in a checklist, or as a diagram that visualizes those steps. Workflows promote logical separation between the control flow of your job's stepwise logic and the actual units of work that contain your unique business logic. With this division, you can manage, maintain, and scale the state machinery of your application separately from the core business logic. As your business requirements change, you can easily change application logic without changing the underlying state machinery, task dispatch, and flow control. Workflows

Amazon States Language

Step Functions implements the open source Amazon States Language (ASL), which is a JSON-based workflow definition language. ASL models workflows as a state machine, where you define a set of states with transitions between them. ASL includes several state types that support the flow of data through your workflow and control of the logic (e.g., Pass State, Choice State, Parallel State, and Fail State). Task states are used to execute work.

The state machine model for ASL has the advantage of making these workflows inherently visual. This is true for creation, editing, and sharing of workflow definitions but also for interpreting and observing historical behavior of workflow executions.

Step Functions Service Integrations

Step Functions includes direct integration with over 220 AWS Services. Optimized Service Integrations provide simplification to make it easier to integrate with services such as AWS Lambda, AWS Glue, Amazon SQS, and Amazon EMR. In addition, AWS SDK Service Integrations provide direct integration with over 11,000 API Actions from over 220 AWS Services.

Workflow Studio

Workflow Studio is a low-code visual workflow designer for Step Functions. Workflow Studio is available in the AWS Console and makes it easy build, edit, visualize, and share your workflows.

When to use this tag?

Use this tag when you have a question about the Step Functions service, about using the Step Functions service along with other AWS Services, or if you have questions about how to build cloud workflows in AWS. Also use this tag for questions you have about the Amazon States Language

Other Step Functions Resources

1505 questions
19
votes
4 answers

Passthrough input to output in AWS Step Functions

How can I passthrough the input to a Task state in an AWS Step Functions to the output? After reading the Input and Output Processing page in the AWS docs, I have played with various combinations of InputPath, ResultPath and OutputPath. State…
matsev
  • 32,104
  • 16
  • 121
  • 156
18
votes
6 answers

How to use jsonPath inside array in AWS Step Functions

I am writing an AWS step function, and for one of the steps, I wish to call a lambda that accepts an array as one of the inputs. However, if I try to pass in a JsonPath into the array, I get The value for the field 'arrayField.$' must be a STRING…
alexgbelov
  • 3,032
  • 4
  • 28
  • 42
17
votes
4 answers

Unit testing AWS: step function

I am beginner in AWS and i have created my first AWS step function given below, Now next step is to unit test this step function. I independently unit tested my lambda function now i got stuck and have no idea about, how can i proceed for unit…
Vicky Kumar
  • 1,358
  • 1
  • 14
  • 26
16
votes
3 answers

Passing data to step function catch

I'm using step functions on AWS. Consider the state machine made up of lambdas: "StartAt": "Metadata", "States": { "Metadata": { "Type": "Task", "Resource": "${metadataArn}", …
Zachscs
  • 3,353
  • 7
  • 27
  • 52
16
votes
4 answers

AWS Step Function - Adding dynamic value to Pass state type

I have the following state defined in my state machine. "loop":{ "Type": "Pass", "Result":{ "totalCount": "$.newFieldsResponse.body.count", "currentCount": 0, "step": 1 }, "ResultPath":…
Furqan Shaikh
  • 371
  • 2
  • 4
  • 13
15
votes
3 answers

What is the AWS Service Principal value for stepfunction?

I'm writing the terraform for creating an IAM role for AWS StepFunctions. What should be the value for Principal in assume_role_policy { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { …
Neeraj
  • 1,769
  • 3
  • 24
  • 41
15
votes
2 answers

Can a lambda in an AWS Step Function know its current Execution Id of AWS Step Function?

For a lambda executed within a step function, I want to know the current execution id of AWS State Machine within that. Is there a way to know this within the step function?
15
votes
2 answers

What happens when I stop an execution in AWS Step Functions?

I was reading the API documentation an there's an action called StopExecution. https://docs.aws.amazon.com/step-functions/latest/apireference/API_StopExecution.html I was wondering what it does. Yes, of course, it stops the execution, but what if…
drpexe
  • 466
  • 4
  • 13
15
votes
4 answers

Can a lambda in an AWS Step Function know the name of the step it is in?

For a lambda executed within a step function, I kind of expected that I could get the name of the current step from the lambda context, but it doesn't seem to be that simple. Is there any way to get the name of the current step in a lambda that is…
Free Willaert
  • 1,139
  • 4
  • 12
  • 24
14
votes
3 answers

AWS Step Functions - Pass input to another task

How can I pass my input to my output in a task in AWS Step Functions? I'm aware of this question, and the docs: If the value of ResultPath is null, that means that the state’s own raw output is discarded and its raw input becomes its result. But…
Gustavo Lopes
  • 3,794
  • 4
  • 17
  • 57
14
votes
2 answers

SerializationException:Start of structure or map found where not expected: API Gateway to Step function

I am using the standard blog tutorial on integrating api gateway with step functions from here: https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html My step function expects the following output: { "my_params": { …
Omkar
  • 2,274
  • 6
  • 21
  • 34
14
votes
2 answers

How to pass sensitive information securely in AWS Step Functions

Using AWS Step Functions to string together Lambdas is interesting, but is there a way to disable/hide logging on the execution details screen? Private information being handed from one lambda to another needs to be able to be done in secret, and…
Bronanaza
  • 793
  • 2
  • 7
  • 16
14
votes
2 answers

Invoking AWS Step function from Lambda in python

So I am trying to invoke a simple step function I wrote using a Lambda in python. I am using boto3 for this purpose client = boto3.client('stepfunctions') response = client.start_execution( stateMachineArn='aws:states:.......', …
Hassan Jalil
  • 1,114
  • 4
  • 14
  • 34
13
votes
5 answers

How to stop all running Step Functions of a specific state machine?

I accidentally started very many step functions and now wish to terminate all of them. Any smart ways to do this using the CLI or web console?
Pål Brattberg
  • 4,568
  • 29
  • 40
13
votes
2 answers

How to limit concurrency of a step in step functions

I have a state machine in AWS. I want to limit concurrency of a task (created via lambda) to reduce traffic to one of my downstream API. I can restrict the lambda concurrency, but the task fails with "Lambda.TooManyExecutions" failure. Can someone…
user7365614
  • 469
  • 2
  • 4
  • 14