#100DaysOfWeb in Python Transcripts
Chapter: Days 85-88: Serverless Python with AWS Lambda
Lecture: A practical Lambda use case: CodeChalleng.es

Login or purchase this course to watch this video and the rest of the course contents.
0:01 And here I'm logged into codechalleng.es PyBites Coding Platform. And one example case where we use AWS Lambda is for our Bites of Py Exercises.
0:14 So if I click on one. I already did this one so let's try it again. If I hit save and run test, the code I type in here
0:24 together with the test, are sent over to AWS Gateway API which is the interface to get to our lambda and we will learn all of that in this chapter.
0:35 When I click on this button the lambda function is invoked and it passes back the output. So here I didn't do any coding so the test obviously failed
0:49 but yeah that's pretty cool so if you allow a user to submit any random code there's of course, a security issue
0:55 but we have the lambda as a sandbox where we execute Python and it's totally isolated from our Django web app. So if I code this in...
1:09 The exercise was about returning a range of one to 100 if the numbers argument was not provided. Now it's calling the lambda again...
1:26 Still not right. Probably have to look for it non-specifically. It's calling the lambda again and now I pass pybite. The test, pass.
1:44 So all this code execution actually happened on AWS Lambda, calling its API with a payload and providing back the output which we consume here
1:56 and we make a decision based on if it's correct or not. So again: exercise, code, save and run test button reaches out through a Lambda Function
2:10 executes the code and gives back a result. We really love AWS Lambda and I hope this gets you excited
2:17 for the stuff you're going to learn in this chapter.


Talk Python's Mastodon Michael Kennedy's Mastodon