AWS API Endpoint

The AWS API Gateway provides a way to evaluate limit requests using a usage plan for different users.

But the speed limit is applicable for all endpoints. So, if I have a GET request and other endpoints of a POST request, can I set different limits for a GET request and a separate limit for POST requests?

Example:

GET request endpoint

 https://aws.api.gateway/v1/get_data <- set rate limit to 10,000 

POST request endpoint

 https://aws.api.gateway/v1/post_data <- set rate limit to 100 

POST requests are an expensive operation, so I want to limit the number of requests to a specific user, while allowing a large number of GET requests.

The requirement is basically to have 2 different speed limits for two different endpoints.

+5
source share
1 answer

You can have two different speed limits for two different endpoints.

If you go to the gateway steps and click on one of the endpoints, you will see something like this ...

Default settings

Thus, by default, all endpoints use your speed limits at the scene level. But you choose "Override for this method", you will get this ...

Override Settings

Then you can set the speed limit at the method level for this HTTP method.

Link: http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html#how-to-stage-settings

  1. To override scene-level damping for individual methods, expand the scene under the Stages secondary navigation panel, select the method of interest, and return to the scene editor, select "Override" for this method for "Settings". In the default Throttling area, select the appropriate options.
+4
source

Source: https://habr.com/ru/post/1271616/


All Articles