Hi, Let me know how to Triggering AWS Step Functio...
# sst
s
Hi, Let me know how to Triggering AWS Step Functions by AWS API Gateway Calls in SST
f
Hey @Sakar, you mean an Api request directly starts a Step Function execution without going through a Lambda function right?
s
@Frank Yea, that is what I want. Invoking a State Machine from RestAPI by passing parameters.
f
I will try to put something in this week.
s
@Frank Thank you.
m
@Frank any update on that? issue on github seems to be laying several months in backlog. How would recommend starting step functions from the ApiGateway if the SST construct is not yet expanded? I am asking about the Express StepFunctions which will get executed and return results to the Api Client. a) via lambda? -> easy, but does not convince me boxing Step Function into lambda and its limits + costs (memory, duration, etc) b) via unboxing apigateway.HttpApi from sst.Api and adding integration to the route there via https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-apigatewayv2.AddRoutesOptions.html? not sure if it possible, did not find enough time to find out working example c) via a separate instance of the API like suggested here: https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-step-functions-rest-api-integration-cdk.html d) use cdk RestAPI construct -> how would replacing sst.Api with RestAPI impact my development expierence? e) anything else? @Sakar how do you run through it?
update ad b. I think it is not possible to start StepFunction via CDK from HttpApi.
f
Hey @Marcin M, it is doable in CDK now as HTTP API just supported AWS service integration - https://github.com/aws/aws-cdk/pull/18154
However, there isn’t a high level construct to make HTTP API -> Step Function easy yet.