AWS API Gateway with API Key / Usage Plan (LATEST)

  Рет қаралды 8,924

LoveToCode

LoveToCode

Күн бұрын

Пікірлер: 19
@MitsiAg
@MitsiAg 5 ай бұрын
If i'm making a saas application that lets user generate there own api key to use the api and given all apis are behind api gateway. Is there a way the api can be initialised at account level?
@lovetocode4486
@lovetocode4486 5 ай бұрын
Hi Mate, As I understood your scenario, the client hits API gateway with his own api key and then it passed to your APIs. You want to measure how many requests each client. If that is the case, you can add Lambda authoriser (here you are just counting the number of requests. It doesnt do any auth logic) which can read the api key and measure how much many requests each client send. You can save this number in DB. You have to pass the header record from API gateway to the authoriser lambda. Assuming the client send the api key in the header. There are two video can be helpful: 1. How to create Lambda Authoriser kzbin.info/www/bejne/qIO0k4mAndGjeZY 2. How to pass header info from api gateway to lambda kzbin.info/www/bejne/pWqbooyLe7iEmMU Please let me know how this helps. Thanks
@Yog8899
@Yog8899 4 ай бұрын
Can i use usage plan without api key ? I dont want to use api key.. i created useage plan but still i am able to hit request multiple times...
@lovetocode4486
@lovetocode4486 4 ай бұрын
Hi Mate, Usually usage plan comes with API-Key implementation. BTW still you can limit requests in some extends. Go to YOUR_API=> STAGES=> YOUR_STAGE=> YOUR RESOURCE=> ACTION => Then "Method overrides" => Throttling
@Yog8899
@Yog8899 4 ай бұрын
@@lovetocode4486 yes but that rate and burst limit apply on that perticular API and not for a IP I think ...I mean if user A consumus all the request...then user B will get too many requests
@aribudimn1789
@aribudimn1789 Жыл бұрын
this is what i need... i dont need cognito or lambda authorization... this is save the day... thank you
@lovetocode4486
@lovetocode4486 Жыл бұрын
Glad to here @Ari. Thanks for the comment
@jafarsafdari2753
@jafarsafdari2753 Жыл бұрын
Grate video, Thanks
@lovetocode4486
@lovetocode4486 Жыл бұрын
Thanks @jafarsafdari2753
@leonardorighi1168
@leonardorighi1168 Жыл бұрын
Thanks
@lovetocode4486
@lovetocode4486 Жыл бұрын
Glad that helps. Thanks
@nishchin8393
@nishchin8393 Жыл бұрын
Great tutorial. Is there a way we can exclude a usage plan and use only key?
@lovetocode4486
@lovetocode4486 Жыл бұрын
Hi NishChin, You have to create usage plan and that is where you can attach the API end point. If you dont like Usage, just set to unlimited. That is same as no usage plan. Hope this helps.
@ShakiraWilliam-jb2ff
@ShakiraWilliam-jb2ff Жыл бұрын
To the point 👉. Nice
@lovetocode4486
@lovetocode4486 Жыл бұрын
Thanks
@osolitario199
@osolitario199 Жыл бұрын
Perfect! Thanks.
@lovetocode4486
@lovetocode4486 Жыл бұрын
Thanks for the comment :)
@NamasteNorth
@NamasteNorth 8 ай бұрын
How can I handle 429 exceptions automatically. I want to be notified when the usage quota of any user is almost exhausted so that I can make a decision whether to increase the quota or not
@lovetocode4486
@lovetocode4486 8 ай бұрын
Hey Mate, The cloudwatch metric for API doesn't come specifically 429 (I has metrics for 4xx errors). So have to do a custom implementation. you can use "get-usage" awscli.amazonaws.com/v2/documentation/api/latest/reference/apigateway/get-usage.html api end point to get the usage information and increase the usage limit. Adding a scheduled lambda which checking the usage and increase the limit based on the result.
DynamoDB index (Global index and Local Index) (NEW)
38:53
LoveToCode
Рет қаралды 1,8 М.
Secure API Gateway using Cognito Authorizer (NEW)
29:51
LoveToCode
Рет қаралды 41 М.
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 24 МЛН
Ozoda - Lada ( Ko’k jiguli 2 )
06:07
Ozoda
Рет қаралды 15 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН
Secure API Gateway using Lambda Authorizer (NEW)
33:32
LoveToCode
Рет қаралды 24 М.
Usage Plan & API key - Amazon API Gateway
20:34
Knowledge Amplifier
Рет қаралды 2,9 М.
AWS API Gateway tutorial ( Latest)
31:00
LoveToCode
Рет қаралды 29 М.
How to Improve Performance of AWS API Gateway
24:22
LoveToCode
Рет қаралды 674
API keys and Usage Plans in AWS API Gateway | Step by Step Demo
19:31
AWS API Gateway Websocket Tutorial With Lambda | COMPLETELY SERVERLESS!
19:07
What is Rate Limiting / API Throttling? | System Design Concepts
16:11
Be A Better Dev
Рет қаралды 66 М.
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 24 МЛН