AWS Step Functions State Machine

This page shows how to write Terraform and CloudFormation for Step Functions State Machine and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_sfn_state_machine)

Provides a Step Function State Machine resource

Parameters

Example Usage (from GitHub)

github-icongilyas/infracost
resource "aws_sfn_state_machine" "expressWithoutUsage" {
  name       = "my-state-machine"
  role_arn   = "arn:aws:lambda:us-east-1:123456789012:resource-id"
  type       = "EXPRESS"
  definition = <<EOF
{
github-iconroguehedgehog/claire
resource "aws_sfn_state_machine" "claire_investigation" {
  name       = "claire_investigation"
  role_arn   = aws_iam_role.claire_state_machine_role.arn
  definition = data.template_file.claire_investigation_state_machine.rendered

}

CloudFormation Example (AWS::StepFunctions::StateMachine)

Provisions a state machine. A state machine consists of a collection of states that can do work (Task states), determine to which states to transition next (Choice states), stop an execution with an error (Fail states), and so on. State machines are specified using a JSON-based, structured language.

Parameters

Frequently asked questions

What is AWS Step Functions State Machine?

AWS Step Functions State Machine is a resource for Step Functions of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Step Functions State Machine?

For Terraform, the gilyas/infracost and roguehedgehog/claire source code examples are useful. See the Terraform Example section for further details.