Sergii S.
Sergii S.

Reputation: 449

Call AWS Lambda from Step Funtion using specific URL with parameters

I am trying to orchestrate UI calls using step function with the minimal impact. Currently I have a lambda function that can be called using different URLs via API gateway, for instance, following URLs are used to call the same lambda:

http://base.url/orders/get/order/{userid}
http://base.url/orders/get/allorders/

I know that it isn't a best practice for lambdas, but we have what we have. Now I need to add a step function between API gateway and lambda to orchestrate calls. I need step function to be able to call step function using these urls, but I cannot understand how to do that.

Here are some links that I already checked:

Is there a way to do what I need to do?

Upvotes: 1

Views: 761

Answers (1)

Jason Wadsworth
Jason Wadsworth

Reputation: 8887

It sounds like you just need to format the message to the lambda in a way that looks like what would be coming from the API Gateway. If that's the case you can see what an API Gateway request would look like by selecting Amazon API Gateway AWS Proxy from the lambda test events in the console. From there you should be able to modify the payload to match your needs.

Upvotes: 2

Related Questions