0
votes

From my understanding, API Gateway can trigger the Step Function. To kick off our state machine execution we need to send a post request as input.

The issue I am coming across is that API gateway will not wait for the execution to finish so it is no way of allowing the step function to respond back to the request:

Below is an image to outline this.

enter image description here

If this is in fact true, is there a way to call a lambda from within my lambda?

1

1 Answers

1
votes

That is true, any invocation of Step Functions will immediately return a success response with an execution ARN that can be used to track the execution status.

If this is in fact true, is there a way to call a lambda from within my lambda?

Yes absolutely, via the AWS SDK for the programming language you are using you can call the Lambda invoke() method. Although if you have one Lambda waiting on another Lambda to finish executing, be aware that you are going to be doubling the AWS Lambda charges you incur.