API Gateway Count Metrics per API Key

0

Customer would like to know if there is a CloudWatch metric, or other mechanism, to report on the number of requests against their AWS API Gateway per API Key. The goal is to distinguish how many requests are coming from each API Key.

2 Antworten
1

Hi, @Adam R

You can create a usage plan in API Gateway and export a report (JSON / CSV) for each usage plan from there.
In the report, you can get the number of accesses for each associated API key.

profile picture
EXPERTE
iwasa
beantwortet vor 2 Jahren
  • With the usage plan is there a way to query the data via API or just JSON/CSV export?

  • I was late in replying. sorry.
    In the Usage Plan, you just export.
    You can query using other services (eg Athena).

1

I created a solution that queries an API quota defined by a usage plan, publishes to CloudWatch and sends a notification if it exceeds a threshold. A description and link to code is available on Medium:

https://medium.com/@allenbrodjeski/monitoring-aws-api-gateway-quota-usage-188d440c9c44

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen