Hello! Does sst work for debugging AWS Step Functi...
# help
Hello! Does sst work for debugging AWS Step Functions?
It depends on what you mean by debugging step functions. I'm using SST to debug Lambdas in my Step Function workflow
SST doesn't have any constructs for Step Functions. You'd use CDK directly to provision step function workflows, but use the sst.Function wherever you use a LambdaInvoke task
Understood! I want to trigger a AWS Step Function from AWS Console and debug the functions from VS Code. Is it possible?
You bet!
A quick copy/paste summary of what this would look like, please forgive any typos:
Copy code
# index.ts
import { FunctionStack } from "./FunctionStack";
import { StepFunctionStack } from "./StepFunctionStack";
import { App } from "@serverless-stack/resources";

export default function main(app: App) {

  // Set default runtime for all functions
    runtime: "nodejs16.x",
    srcPath: "src",

Copy code
# FunctionStack.ts

import { StackContext, Function } from "@serverless-stack/resources";

export function FunctionStack({ stack, app }: StackContext) {

  const myFunction = new Function(stack, "my-function", {
    handler: "functions/my-function.handler",

  return { myFunction}
Copy code

import { FunctionStack } from "./FunctionStack";
import { StackContext, use } from "@serverless-stack/resources";
import { aws_stepfunctions_tasks as tasks } from "aws-cdk-lib";
import { aws_stepfunctions as sfn } from "aws-cdk-lib";
import { Duration } from "aws-cdk-lib";

export function StepFunctionStack({ stack, app }: StackContext) {
  const { myFunction} = use(FunctionStack);

  const myFunctionTask = new tasks.LambdaInvoke(stack, "MyFunctionTask", {
    lambdaFunction: myFunction,
    // Lambda's result is in the attribute `Payload`
    inputPath: "$",

  // Define next state for manager validation step
  const definition = myFunctionTask

  const myStateMachine = new sfn.StateMachine(stack, "MyStateMachine", {
    stateMachineName: `MyStateMachine`,
    timeout: Duration.seconds(10),

  return {transferStateMachine}
Thanks @Seth Geoghegan!!!
Good luck! I just started working with Step Functions recently, and SST really boosts the productivity.
The Step Functions tooling + SST is an amazing combo
I feel like I'm in the future 😆
Thanks for sharing @Seth Geoghegan!