API Gateway Count Metrics per API Key
Is there a way to view how many times an API endpoint has been called per API key?
I have 3 different API keys for 3 different customers and they all call the same endpoint. I do not want to create any usage plans as there are no limits on how many times they can call the endpoint.
Thanks.
Hi, @vbo119
It's easiest to enable the API Usage Plan.
However, you can use the Usage Plan without any restrictions by disabling Slottling and Quota in the API Uasage Plan.
As another idea, you can output the API key information to the custom log with "context.identity.apiKeyId" etc. and aggregate it.
In your scenario, I recommend using the Usage Plan without any restrictions.
API Gateway usage planning is not about managing your billing amount, it is about managing usage fees and throttling when you provide the API.
- If you're referring to an invoice issued by AWS, then "No."
- If you create your own invoice for each API provider, you can use the API to get the usage and you will be able to calculate it yourself.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage.html
Relevant questions
API Gateway Count Metrics per API Key
asked 2 months agoAPI Key per resource?
asked 2 months agoAPI Gateway Count Metrics per API Key
asked a month agoClient API throttling in API Gateway
Accepted Answerasked 2 years agoHow do I rotate an API gateway key keeping its current used quota?
Accepted Answerasked 25 days agoHealth Checks to AWS API Gateway fail when API keys enabled (x-api-key)
asked 5 years agoHow to associate an api key to an API Gateway websockets API
asked 3 years agoLambda Authorizer with API Key enabled on API Gateway
asked 3 months agoMultiple API keys and the flow rate limit in the usage plan
Accepted Answerasked 2 years agoHTTP API Gateway: Specifying Different Lambda Version per Stage
Accepted Answerasked 6 months ago
Can the data for the Usage Plan be included in the invoice? Or do I need to manually export the usage every month?