I have an AWS serverless API configured with a usage plan. I want users to be able to know how many more requests they can make, so they are don't get stuck with:
HTTP/2 429
content-type: application/json
content-length: 28
date: Mon, 16 Apr 2018 03:41:12 GMT
x-amzn-requestid: 02436b06-4128-11e8-aa37-8f617035a300
x-amzn-errortype: LimitExceededException
x-cache: Error from cloudfront
via: 1.1 de2aa82ec56d0a6d749df4bf0a88b28f.cloudfront.net (CloudFront)
x-amz-cf-id: afyULHDbLwJYAJO07zLeFG1Q0tZA-VhB3kezRgE1UBldQdfaGRQaZQ==
{"message":"Limit Exceeded"}
I've been looking over AWS documentation https://docs.aws.amazon.com/cli/latest/reference/apigateway/index.html#cli-aws-apigateway & https://docs.aws.amazon.com/sdk-for-go/api/service/apigateway/
And I can't seem to figure out how to tell how many requests an API key is allowed to make! My goal is to see present user's something like Twitter's:
x-rate-limit-limit: 1500
x-rate-limit-remaining: 1499
x-rate-limit-reset: 1523850782
What am I missing ?