sst icon indicating copy to clipboard operation
sst copied to clipboard

Api: support Step Function integration

Open fwang opened this issue 4 years ago • 5 comments

Requested by Sakar on Slack

fwang avatar Aug 09 '21 05:08 fwang

+1

kotfilemon avatar Jan 08 '22 22:01 kotfilemon

Any news on being able to run Step Functions locally @fwang?

riccardogiorato avatar Feb 10 '22 16:02 riccardogiorato

+1

marconucara avatar Feb 10 '22 16:02 marconucara

@riccardogiorato are you looking for API invoking a Step Function directly, or being able to live debug a Step Function locally?

You can already do the latter by passing sst.Function to tasks.LambdaInvoke, for example:

import * as tasks from "aws-cdk-lib/aws-stepfunctions-tasks";

const submitJob = new tasks.LambdaInvoke(this, 'Job', {
  lambdaFunction: new sst.Function(...),
});

Let me know, and we can create a friendlier wrapper around this.

fwang avatar Feb 10 '22 19:02 fwang

Thanks for the explanation @fwang Would be great if you can mention this in the documentation. Step functions is great for long running tasks and this is the only real component I was missing when I read the sst documentation.

pharindoko avatar Jun 17 '22 12:06 pharindoko

We are wondering if we could use SST in my company but if we can't deploy Step Functions it won't be an option anymore :( +1 to add it on a next release

LudoLab92 avatar Oct 14 '22 14:10 LudoLab92

@LudoLab92 You can deploy Step Functions (and any AWS resources) in SST today. We just haven't created a "beautiful" syntax for it yet.

You can use any AWS CDK constructs in SST. Here's an example of how to do it currently — https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions-readme.html#example

Use sst.Function instead of lambda.Function, and live dev will work.

Let me know if it makes sense.

fwang avatar Oct 14 '22 18:10 fwang

Let me know, and we can create a friendlier wrapper around this.

@fwang I would love to have this as well. We are building a step functions heavy application with SST and AWS CDK and this would come in so handy!

ifeltsweet avatar Sep 25 '23 17:09 ifeltsweet