AWS API Gateway to Lambda Tutorial in Python | Build a HTTP API (2/2)

  Рет қаралды 112,843

Be A Better Dev

Be A Better Dev

Күн бұрын

Пікірлер
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Looking to become an expert on AWS Lambda? Check out my new course: AWS Lambda - A Practical Guide www.udemy.com/course/aws-lambda-a-practical-guide/?referralCode=F6D1A50467E579C65372
@opensiembro7331
@opensiembro7331 3 жыл бұрын
This series should not stop here. I hope you can continue adding more stuff to this demo
@justinschoen6656
@justinschoen6656 3 жыл бұрын
this was so helpful. watching a knowledgeable person on this topic reason through creating an API and then testing it solidified a lot of concepts I had been fumbling around with. great video!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks so much Justin! Your kind words really mean a lot. Take care!
@kanhaglobal
@kanhaglobal 2 жыл бұрын
Great Demo of Lamda and API Gateway Integration for Newbies ... Thanks a Lot !
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Very welcome!
@codeblooded6760
@codeblooded6760 5 күн бұрын
This is Gold. Just Beautiful❤
@kevinreagan3355
@kevinreagan3355 2 жыл бұрын
Thank you for this post. I have been having trouble getting my first AWS API working and this helped me get through it.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad I could help!
@jumboliah13
@jumboliah13 3 жыл бұрын
oMg (camel case, you just taught me that lol)... Hey, thanks so much for all your videos. Soooooooo useful and helpful. You usually answer 3 to 8 burning questions I have in every single one of your videos. Fantastic stuff!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
youreWelcome!
@guillermopalaciosgaray
@guillermopalaciosgaray 2 жыл бұрын
Awesome! Best tutorial I've seen so far
@leandrogamarra3163
@leandrogamarra3163 2 жыл бұрын
AH MAN THANK YOU FOR THIS. I wasnt even getting logs from cloudwatch, my lambda is in a container. Wouldnt have done it without u.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad I could help Leandro!
@prashantchauhan6703
@prashantchauhan6703 2 жыл бұрын
Nice!!! The train of thought is so logical and simplistic !!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thanks Prashant!
@nabeelchaudhary7973
@nabeelchaudhary7973 2 жыл бұрын
Great work bro...better than paid courses
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thank you so much !
@nabeelchaudhary7973
@nabeelchaudhary7973 2 жыл бұрын
@@BeABetterDev Always waiting for new AWS tutorial
@mightye6669
@mightye6669 3 жыл бұрын
thanks alot man, all the other videos i found were either outdated or skipped fundamental steps. was very helpful
@rajatagarwal2379
@rajatagarwal2379 3 жыл бұрын
This is good stuff. I have been trying to wrap my head around some concepts , watching this video made it crystal clear.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad it was helpful!
@SylOmope
@SylOmope 2 жыл бұрын
Absolutely awesome vid. You're the man! 👍
@BeABetterDev
@BeABetterDev 2 жыл бұрын
You're very welcome!
@Victor-yo9rz
@Victor-yo9rz 3 жыл бұрын
It was very useful, big thanks to you, first KZbin lesson I'd like to share with someone :)
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks so much Victor! Really appreciate the kind words. Take care!
@joanwesay9371
@joanwesay9371 3 жыл бұрын
Excellent video! Super helpful and informative. I'd try to go ahead of the video, hit an error, then start the video and you'd explain exactly how to fix it lol.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi John, Going ahead of the video is a great way to learn! I'm glad you found the video helpful and thank you for your kind words! Daniel
@kushmadlani3395
@kushmadlani3395 2 жыл бұрын
Really useful and great video. Thank you for sharing!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad it was helpful!
@sp3ctrums264
@sp3ctrums264 Жыл бұрын
This was so helpful. Absolutely amazing thank you!
@BeABetterDev
@BeABetterDev Жыл бұрын
You're so welcome!
@goldiemusic8394
@goldiemusic8394 2 жыл бұрын
worked for me, could never thank you enough.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
You're welcome!
@rutvikpatel7640
@rutvikpatel7640 2 жыл бұрын
really in depth and good tutorial, thank you for posting.
@MrRin_
@MrRin_ Жыл бұрын
I love this video! Thanks a lot, Daniel, you are a great teacher
@alexsepel6167
@alexsepel6167 3 жыл бұрын
This is incredibly useful. Thank you very much for taking your time and energy to create this tutorial!
@ReddSpark
@ReddSpark Жыл бұрын
This was an awesome explanatory video! Helped me a LOT to get up to speed!
@subha9333
@subha9333 2 жыл бұрын
Thank you so much for putting so much effort into making this video for us :)
@BeABetterDev
@BeABetterDev 2 жыл бұрын
You're very welcome Subha!
@nickdube7881
@nickdube7881 3 жыл бұрын
Great explanation of things. Thank you!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome Nick!
@Room3102
@Room3102 2 жыл бұрын
Awesome. Just the video I needed. Thanks!
@3083mann
@3083mann 3 жыл бұрын
A very succinct demo. Thanks!👍
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome Manish!
@nassehk
@nassehk 2 жыл бұрын
Great tutorial mate. Thank you.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad it helped!
@michaelbedry3530
@michaelbedry3530 3 жыл бұрын
This was a great video and very helpful
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome!
@SoyJavero
@SoyJavero 2 ай бұрын
Thanks for sharing JSON formatter and validator
@shooreshgolzari3885
@shooreshgolzari3885 2 жыл бұрын
Superb tutorial!
@MohanDas-ne4ci
@MohanDas-ne4ci Жыл бұрын
Thank you for the clear explanation!
@poonam-kamboj
@poonam-kamboj 2 жыл бұрын
very nice explanation
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Youre very welcome Poonam!
@fancylad2006
@fancylad2006 Жыл бұрын
Great Video! Thank you.
@nicolemartinez8918
@nicolemartinez8918 2 жыл бұрын
Thank you so much for this amazing training!!
@ZergStylexDD
@ZergStylexDD 2 жыл бұрын
awesome lesson.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thank you!
@ancientelevator9
@ancientelevator9 2 жыл бұрын
15:20 - FYI you could also just paste your json into JSON.parse() in the chrome console
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Great tip, thank you!
@Atpugtihsrah
@Atpugtihsrah 2 жыл бұрын
Thanks. Great video.
@sebastiencrepel5032
@sebastiencrepel5032 2 жыл бұрын
Hello. Many thanks. It helps me a lot !
@dokst-b9s
@dokst-b9s Жыл бұрын
my logs do not show "version 2.0 routekey - all they show is start initstart and end - have no idea what is being passed in.
@akrlrng3016
@akrlrng3016 3 жыл бұрын
Good starting point...
@tttcccc
@tttcccc 2 жыл бұрын
Thanks for the video. Quick questions: why we use API gateway? any benefit? could we just expose the lambda API to the public internet and calling?
@mohamed88885
@mohamed88885 3 жыл бұрын
Hi, are you able to provide a tutorial how to automate services when a latest image is push to ECR, EventBridge or Lambda will be invoked and triggered to deploy or force new deployment in ECS.
@santoshlml
@santoshlml Жыл бұрын
You are the best!
@mrTiberiuDubau
@mrTiberiuDubau 2 жыл бұрын
awesome tutorial man, really really appreciated! also, where can I get that fancy hand cursor of yours? 🙂
@puma509
@puma509 Жыл бұрын
thanks... Wish it was more up to date.
@ruggedland
@ruggedland 2 жыл бұрын
Why did you still need to deploy the API manually whenever you made a change even though you had auto deploy enabled?
@ktapython600
@ktapython600 2 жыл бұрын
Hi Better Dev, Thank you so much for your great videos and well-articulated teaching style. I have been watching your "AWS API Gateway" and following along with hands-on exercises. I received the following message from Postman: "message": "Internal Server Message". I also received the following message from my CloudWatch logs: [ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'lambda_function': expected an indented block (lambda_function.py, line 16) Traceback (most recent call last): File "/var/task/lambda_function.py" Line 16 elif event['rawPath'] == CREATE_RAW_PATH: In my function code on Lambda, I have adjusted this indented issue many times but get the error message. Please kindly advise. What am I doing wrong? Thank you!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Hi there, this looks like a code format problem. I would try to run your code through some kind of code validator. Hope this helps.
@intercepted16
@intercepted16 10 ай бұрын
I get internal server errors when I call the routes....
@LuxiMeng
@LuxiMeng Жыл бұрын
how to get to that page on post man? that's a new tool and once I downloaded it, it doesn't show the same thing as you have
@sauwurabh
@sauwurabh 3 жыл бұрын
(1) So I used aws to upload image directly from front end(html) to s3 ps: (its up and running) (2) and I have a python code that uses aws rekognition to recognise the image attributes. (3) now my question here is how can I run my image recognition python code by pressing on a html button that I have to insert in the (1)'s page that i made ?
@anilchaudhry804
@anilchaudhry804 3 жыл бұрын
Bro videos are good, please build a complete microservice from scratch end to end
@khushaltrivedi9829
@khushaltrivedi9829 3 жыл бұрын
can you make detail video on redshift also
@iulicush86
@iulicush86 2 жыл бұрын
For post call it showed \t because you selected text instead of Json for payload in postman
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thanks!
@LuvxJacqu4li8e
@LuvxJacqu4li8e 2 жыл бұрын
I used form data for my fast api and flask
@MoyedAnsari
@MoyedAnsari 3 жыл бұрын
Can we have any video where lambda function is using Aurora ?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Moyed, check out my video on Lambda + Aurora here: kzbin.info/www/bejne/jV7Xq6J9jrKZiqM
@AlvinC-sz3li
@AlvinC-sz3li 3 жыл бұрын
Do you have any videos for consuming Kinesis inside ECS? We have some Kinesis triggered job that could last for more than 15min, so we cannot use Lambda. However, it seems like consuming Kinesis without Lambda is very complicated, need to use the Kinesis Client Library and handle shard myself, and also requires a job status ddb table. Thanks.
@srb1855
@srb1855 3 жыл бұрын
Fantastic! Thanx
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome!
@manishpingale6558
@manishpingale6558 3 жыл бұрын
Thank you so much!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're welcome Manish!
@MubashirullahD
@MubashirullahD 3 жыл бұрын
I used Curl to test mine.
@chrislally
@chrislally 3 жыл бұрын
for anyone getting an error on the Post request, make sure to capitalize the "N" in firstName (it is lowercase in the attached code, causing an internal error)
@Varun2799
@Varun2799 3 жыл бұрын
When should you actually use API gateway with Lambda? I mean if i want a full fledged webapp then its probably better to use a web server instead? Which cases would lambda+api gateway be better than a webserver
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi there, I think this video does a good job of answering your question: kzbin.info/www/bejne/m2m5mWxjndiFeNE Thanks!
@Varun2799
@Varun2799 3 жыл бұрын
@@BeABetterDev Yeah I've been binge watching your videos and watched that one. Thanks! You have the best aws content on KZbin atleast for beginners. Subscribed and recommended to all my friends.
@kameswariaparnamantravadi
@kameswariaparnamantravadi 6 ай бұрын
"errorMessage": "'rawPath'", "errorType": "KeyError", is the error message
@prithviboinpally2138
@prithviboinpally2138 3 жыл бұрын
There are some logical issues with this: What happens if you're trying to get the value of a key from the "event" dictionary, but it doesn't exist because the API call didn't include that parameter? How can we set a default value for the API parameters?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi there, You would need to have some basic event validation logic to ensure all expected fields are non-null. This was just a toy example to show how the end to end flow works, but in a real application I would absolutely add validation logic. Hope this helps
@prithvib8662
@prithvib8662 3 жыл бұрын
@@BeABetterDev thanks! I ended up using python's setdefault() function for dictionaries to add default fields to the event dict.
@moemihagiyama7111
@moemihagiyama7111 3 жыл бұрын
Great tutorial! It looks like HTTP API can invoke Kinesis as well. By any chance, do you have a tutorial for that as well?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Moemi! Unfortunately no video on that yet, but maybe soon!
@namanbhayani1016
@namanbhayani1016 2 жыл бұрын
Thanks. I ddnt realize the queryStringParamete stuff while I was building my API. Wasted several hours on this :(
@Tt-wm1ze
@Tt-wm1ze 3 жыл бұрын
hi how would do it with a image ? do you have a email adress??
@jarrodbennie5987
@jarrodbennie5987 3 жыл бұрын
You'd probably use S3 to store the image.
@angelosnm
@angelosnm 3 жыл бұрын
I followed exact steps although I'm getting "Internal Server Error" when accessing my API :(
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi, can you check your cloudwatch logs to see what the error is? There is probably an error in your lambda function itself.
@angelosnm
@angelosnm 3 жыл бұрын
@@BeABetterDev Hi! Thanks for your reply! No any error has been logged. I use my own lambda (not the that is being shown in the video) on which I am returning a valid object type. ibb.co/NSbYRzN
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Angelos, Ah, I think I see the problem. Your response needs to be a well formatted one with a status code of 200 OK to indicate the invocation was successful to API gateway. You can encode the payload in the body field of your response. It needs to look something like this: response = { statusCode: 200, body: JSON.stringify(yourDataHere) };
@angelosnm
@angelosnm 3 жыл бұрын
@@BeABetterDev Hello! Yes, I though that too and already tried it although the issue remains
@alishdhamala9912
@alishdhamala9912 3 жыл бұрын
Did you find the problem?
@mohitsaini6642
@mohitsaini6642 3 жыл бұрын
How to make instagram api to get user details profilepic, full_name,etc
@albertorp2002
@albertorp2002 2 жыл бұрын
está super chévere
@ardikasulistija6574
@ardikasulistija6574 2 жыл бұрын
I followed all the exact steps but I am getting "Internal server error" during the third stage of this tutorial. When checking the logs I get: [ERROR] JSONDecodeError: Expecting ':' delimiter: line 3 column 17 (char 45) Traceback (most recent call last): File "/var/task/lambda_function.py", line 19, in lambda_handler decodedEvent = json.loads(event['body']) File "/var/lang/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/var/lang/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/var/lang/lib/python3.8/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx)
@ardikasulistija6574
@ardikasulistija6574 2 жыл бұрын
I ran the code through a various ptyhon syntax checkers, and theres no issue with the syntax. What am I missing here?
@ardikasulistija6574
@ardikasulistija6574 2 жыл бұрын
Found the issue... there was a syntax error in the body of my POST in postman. :D
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad you figured it out!
How To Add Throttling to API Gateway HTTP API - Step By Step Tutorial
9:17
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
Build a HTTP API using AWS Lambda and API Gateway
24:21
Jonathan Davies
Рет қаралды 17 М.
REST vs HTTP APIs in API Gateway (1/2)
11:25
Be A Better Dev
Рет қаралды 47 М.
What is an API Gateway?
10:19
IBM Technology
Рет қаралды 332 М.
AWS API Gateway to Lambda Tutorial in Python | Build a REST API
11:17
Be A Better Dev
Рет қаралды 349 М.
Building a Serverless REST API in .NET with AWS Lambda
20:13
Nick Chapsas
Рет қаралды 79 М.