API Gateway Count Metrics per API Key

0

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.

vbo119
已提問 2 年前檢視次數 618 次
1 個回答
1

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.

profile picture
專家
iwasa
已回答 2 年前
  • Can the data for the Usage Plan be included in the invoice? Or do I need to manually export the usage every month?

  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南