Skip to content

Latest commit

 

History

History

Aligent AWS Step Function From File

TypeScript version AWS CDK version NPM version

A Step Function construct that loads its definition from a YAML or JSON file.

import { StepFunctionFromFile } from "@libs/cdk-utils/infra";

// Basic usage
new StepFunctionFromFile(this, "MyStateMachine", {
  filepath: "src/step-functions/workflow.yml",
});

// With Lambda function substitutions
new StepFunctionFromFile(this, "WorkflowWithLambdas", {
  filepath: "src/step-functions/workflow.yml",
  lambdaFunctions: [myLambda1, myLambda2],
  definitionSubstitutions: {
    MyCustomParam: "CustomValue",
  },
});