ReactNewbie123
ReactNewbie123

Reputation: 173

Pass Data to Step Function From HTTP API Gateway

I have a Step Function integration with one of my routes in API Gateway. My API is an HTTP API. It has the following settings:

StepFunctions

This is successfully invoking my StepFunction but I am unable to access any of my body parameters. This route is being invoked from a front-end form which submits data. I would like to use this data for further processing in my step functions.

When I see my step function execution, the input is just {}, is there something I need to change?

Upvotes: 3

Views: 1122

Answers (2)

YulePale
YulePale

Reputation: 7736

You can pass multiple values as inputs by enclosing the variables in brackets. For example, ${request.path.name} ${request.path.id}.

You can even put the following values in the input field {"name": "${request.path.name}", "id": "${request.path.id}" } and it will work.

You can read more about this in the AWS API Gateway docs, Transforming API requests and responses section.

Upvotes: 0

Ryan
Ryan

Reputation: 11

In the advanced settings set a value for "Input - optional" of "$request.body"

Upvotes: 1

Related Questions