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
13
votes
2 answers

how to access error information in Step Function from previous Function in Catch state

I am wondering how to access the cause of my custom exception raised inside my lambda function. I need to access it at the end of my Step Functions workflow, as shown below. The diagram below is an example of a failed execution. The error…
13
votes
3 answers

AWS Step Functions with dynamic steps

I am exploring AWS step functions, however, I am not able to find the answer to a question that my use case requires. Let us say we have 10 tasks we can do in the system overall. Sometimes we have to execute tasks 1, 3 and some times 4, 8 while…
sat
  • 5,489
  • 10
  • 63
  • 81
13
votes
2 answers

How can I return the result of a mapreduce operation to an AWS API request

I have a program that performs several thousand monte-carlo simulations to predict a result; I can't say what they really predict, so I'm going to use another example from "the indisputable existence of santa claus", since the content of those…
13
votes
2 answers

AWS SNS vs AWS Step Functions

What's the better option to coordinate tasks between microservices? For example, if I have a microservice that handles customer information and need to notifies other microservices, is it better to create a workflow (AWS Steps) between…
p.magalhaes
  • 7,595
  • 10
  • 53
  • 108
12
votes
2 answers

How to get Task Token in AWS Lambda Function

I have an AWS Step Function with the handlers implemented in Java. My step function definition: definition: Comment: Steps for issuing a card StartAt: RecipientFraudChecks States: RecipientFraudChecks: Type: Task Next:…
Mark
  • 4,428
  • 14
  • 60
  • 116
12
votes
3 answers

Is there a way of running AWS Step Functions locally when defined by CDK?

AWS Step Functions may be run in a local Docker environment using Step Functions Local Docker. However, the step functions need to be defined using the JSON-based Amazon States Language. This is not at all convenient if your AWS infrastructure (Step…
John
  • 10,837
  • 17
  • 78
  • 141
12
votes
2 answers

Is there a way to get Step Functions input values into EMR step Args

We are running batch spark jobs using AWS EMR clusters. Those jobs run periodically and we would like to orchestrate those via AWS Step Functions. As of November 2019 Step Functions has support for EMR natively. When adding a Step to the cluster we…
d.a.d.a
  • 1,296
  • 1
  • 12
  • 28
12
votes
2 answers

Retry logic in AWS step function

I am testing the retry logic of the step function. Theoretically following step function should have been retried to execute the lambda 3 times if it fails. { "StartAt": "Bazinga", "States": { "Bazinga": { "Type": "Task", …
Asur
  • 1,949
  • 4
  • 23
  • 41
12
votes
4 answers

What is the best way to run python scripts in AWS?

I have three python scripts, 1.py, 2.py, and 3.py, each having 3 runtime arguments to be passed. All three python programs are independent of each other. All 3 may run in a sequential manner in a batch or it may happen any two may run depending upon…
12
votes
2 answers

Getting AWS State machine execution ARN inside the step function

I need to get the ARN of the current execution for my state machine inside the state machine itself. Is it possible? So can I create a state machine(say from a lambda function) and then take its execution ARN and pass it as a parameter to that…
Farhan Haider
  • 1,244
  • 1
  • 13
  • 22
12
votes
2 answers

Can AWS step function executes more than 25000 times?

I am currently evaluating AWS state machine that can process single document. The state machine would take 5-10 mins to process a single document. { "Comment":"Process document", "StartAt": "InitialState", "States": { //the document…
LP13
  • 30,567
  • 53
  • 217
  • 400
12
votes
2 answers

Using an amazon step function, how do I write a choice operator that references current time?

In the aws-step function documentation, it seems possible to write a 'choice' state comparing variables from the current state. However, is it possible to write a timestamp comparison referencing the current time? For example, say I want a…
Blake
  • 2,357
  • 3
  • 25
  • 35
12
votes
2 answers

How to invoke an AWS Step Function using API Gateway

How do I invoke an AWS Step Function using an API Gateway POST request, and the request's JSON payload to the Step Function ?
ElFitz
  • 908
  • 1
  • 8
  • 26
11
votes
1 answer

How can I define step function execution name from an EventBridge rule?

I'm using the EventBridge to trigger a step function. My EventBridge rule in the CloudFormation template looks as follows: JobStepFunctionTrigger: Type: AWS::Events::Rule Properties: EventBusName: !GetAtt JobTaskEventBus.Name …
11
votes
5 answers

Not authorized to assume the provided role

I am following the AWS Step Functions tutorial. The whole state machine process is like this. I have a role called step_functions_basic_execution with policy AWSLambdaRole. My Step function state machine is using this role. My step function is { …
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267