3

I'm using AWS API Gateway with quota and need increase the number of requests made to api only if my backend return response with status code 200. So, responses with status different of 200 not are accounted for quota usage.

It's possible? If not, how i could make this?

Thanks

Armando
  • 603
  • 1
  • 5
  • 14

1 Answers1

0

Recently i faced the same question, my solution is a little workaround.

You create two apis with aws api gateway and also two usage plans. The first api should be the api used by your customer, the second api exists only to increase the quota usage value for an API Key, so it should be a simple POST Endpoint. Now create one free usage plan (only throttling) and one usage plan with quota limitation enabled. Then connect the free plan to your api which is responsible for processing the data and connect the quota plan to the additional quota api.

Finally create an API Key for your customer, add both usage plans. Now you only need to call your quota api with the API Key provided by your customers, when their requests were successfully.

Hope this will work for you aswell.

SimonScholl
  • 98
  • 11