Jensd
Jensd

Reputation: 8011

Evaluate requests in the API Gateway

Can the API Gateway evaluate requests and route or return errors (not 200 statuses) on specific parameters?

What I want to achieve here is to NOT have millions of requests hitting our backend API since we already know (by evaluating the parameters) that we are not interested in returning responses on all requests but only a few percent.

I gave set up an API Proxy in the API Gateway with a complete set of requests, responses and backend.

The proxy is fully operational and up and running with throttling etc. What I would like is for the API Gateway to evaluate the requests querystring and depending on the values of certain parameters take different actions?

Let's say the complete URL and querystring is:

https://abc123.execute-api.eu-central-1.amazonaws.com/prod?param1=a&param2=b&param3=c

Now depending on the values of param1, param2 and param3 I might want to:

Is this achievable with the API Gateway or do I need to actually set up a host with a reverse proxy and let that handle this logic?

Upvotes: 0

Views: 191

Answers (1)

Lorenzo d
Lorenzo d

Reputation: 2066

Request parameter and model validation has been a longstanding feature request and we are actively working on it. We'll update this post with more details when the feature has launched.

Update: Request parameter and body validation is now available as of early April 2017. see more details on this blog post.

Upvotes: 1

Related Questions