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 Answers
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
EXPERT
iwasa
answered 2 years ago
  • 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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions