Deploy FastAPI on AWS Lambda ⚡ Serverless hosting!

pixegami · Beginner ·🔧 Backend Engineering ·4y ago

Key Takeaways

Deploying FastAPI on AWS Lambda for serverless hosting using Mangum, API Gateway, and AWS Lambda functions, with a focus on modifying the FastAPI application to work with AWS Lambda and handling requests with Mangum.

Full Transcript

hey everyone welcome to this tutorial where you'll learn how to host a fast api application serverlessly on aws lambda in my previous video we hosted fast api on amazon ec2 which you can think of as virtual servers but some of you asked how to get it production ready meaning how to use it as part of a real business or service honestly with ez2 that's quite a challenge you have to think about things like how to scale out your hosts when your traffic increases how to load balance the traffic how to do rolling updates for an app and how to do os and security patching not to mention it'll be expensive to keep running because you'll be paying for uptime of the server whether you have people using your api or not that is why i prefer to use serverless compute for hosting apis and on aws the serverless compute offering is called aws lambda we can create something called a lambda function which is basically a piece of code we want to run in the cloud except we let aws handle all of the scaling security hosting and load balancing problems it scales very well it's also cheap because we only pay for what we use but the most important thing is that it takes a lot of the boring work off of our plate so how do we use it with fast api well in this video we're going to take a fast api application we're going to modify it to work with aws lambda we're going to upload it test it and then turn it into a live http endpoint and unlike in our ec2 tutorial this api is going to be more or less production ready right out of the box let's get started to work on this project you're going to need to have a fast api project or application ready to use for this one i'm going to be using a project i created as part of a previous video so you can follow along with that if you don't have a project check in the comments below for a github link and you can just clone it directly you also need an aws account and have some knowledge with lambda functions i have a video you can check out on that as well if you're not up to speed with that yet so once you have those two things set up you can start here i've opened up the project folder in my editor which is vs code and the project's really simple there's only one file which is the fast api application file if you're using your own project then you might have a file as well or you might have multiple files it doesn't matter the important thing we're going to look at is this line which we use to create the fast api application so all of this path stuff and all this app stuff that we have here it doesn't we're not going to change any of that we're just going to focus on this thing the problem with running fast api on aws lambda is that lambda functions don't understand this api interface this app get app you know with the routes and everything this agsi interface is not something that's understood by lambda functions instead lambda understands something called a handler function so a basic handler function looks something like this it's basically just a function that takes in two arguments an event and some context and these are both dictionaries when we create a python file that we want to run as a lambda function we have to tell it what we want it to consider the handler function and when that lambda is run it will create this python runtime with these files and it will run this function that we specify for it and then it's going to pass in anything it thinks is relevant so when we hook up a lambda function to an http endpoint maybe with api gateway or whatever technology we use all the things like the path information the headers all that stuff is going to be hidden away in these event and context objects and so we have to find a way to unpack that data and have it route to the appropriate fast api path or this sub function here that we have now we can go the long way by unpacking this ourselves and then figuring out which of these functions to use depending on what event is given or we can sort of take a shortcut and use an existing solution that someone already came up for this and we can use this library called mangum which is an adapter for running agsi applications that's our fast api application there in aws lambda to handle function url api gateway etc etc so the way we use it is we just first have to install it so go to your python environment there and just type pip install mangum and once that's done you can wrap your entire app with a mangum handler so let's go and have a look at their documentation and it's pretty much basically just this first two lines here we have to import it first and now we'll create our handler using that wrapper and i can delete this handler here so now this handler function is something that aws lambda can understand and it's going to route that function request correctly to one of these sub paths so just save that file now our file's ready we need to upload it to lambda so let's go ahead and try that and see what happens go into your aws console and search or click on lambda and once you're there click on create function to make a new lambda function and we're just going to do it from scratch and you can call the function whatever you want i'm going to call it fast api bookstore and then for the runtime we'll choose our python 3.9 or whichever one is the one you want and then we don't really need to do any of this other stuff we can just leave everything else at its default setting so just click create function and wait a while for that to create once it's finished you should see something like this there's a couple of different elements here but we don't have to worry about this top part and if you scroll down a little bit you see the code source so this is what i was talking about earlier where this is going to be the code the python code that your function will run when this lambda function is invoked and here they've written some kind of hello world code for us which just a lambda handler that returns 200. so we can actually test this out now before we change anything just to make sure it works and we're going to need a new test event so we'll just call it hello and then this is the event object that's going to go into the lambda function we don't need to change that we'll just save and then we'll run it and there you go this function actually executes and it returns this hello from lambda text there okay so very basic let's see what happens when we just copy our fast api application and just put it in here so i'm literally just going to copy the entire code and i'm going to put it here but to keep it consistent with our development environment i'm also going to rename this to main.py okay so now that's ready and this function uh is pretty much the same as we have locally now if we actually want to save this change we have to click deploy because here it says change is not deployed so it's if we run it again it's still returning the previous version we had so let's go ahead and hit deploy and once this banner turns green it says it's successfully updated so we hit test again and this time we have an error because we can't find the lambda function module in this file that's because we changed the name of the file to main.py and we also changed the handler name from lambda handler to just handler on its own so we have to tell this lambda function where to look for this this handler function that we created so if you scroll down a little bit you'll see this runtime settings here and here is the handler setting which it's looking for a file called lambda function and a function called lambdahandler in that function so we actually have to edit this and then we're going to change this to main because that's what our file is called and then our function is called handler so main.handler then save okay so we don't actually have to deploy anything again because the code itself didn't change and their settings that we changed below took effect here as we can see so let's go ahead and run this again and see if it works okay so this time it's a different error it actually found the handler function but now it fails because it can't import fast api and this is actually a very common type of failure for people just getting started importing their python functions into lambda because you actually also have to have all the dependencies when you're running a function in lambda it actually this is the only thing it has in its runtime it's got the python library i think it might have the aws api library as well built in by default but apart from that the environment has nothing else so things like fast api or anything that you install with pip you also have to find a way to put it inside this folder here now that doesn't actually sound like a very bad problem like let's just drag and drop all our dependencies in there right but actually it gets more complicated than that for example what if you want to be able to update them how do you keep this function updated how do you keep the dependencies updated and how do you do it in such a way that you can have it working in your dev environment and also synced up to your lambda function in the cloud there there's actually a lot of different ways this problem can be solved if you're familiar with docker then lambda is also able to run docker so you can use that to install all your dependencies there and then just run that docker image you can create something called a lambda base layer where you install all your dependencies once and then it's already existing for anything in your function that uses that base layer or you can pretty much zip up the entire dependency directory on your disk and then upload it to the lambda function and because that's the most straightforward way and the easiest thing to do that's what we're going to do here in this tutorial so now i'm back in my project folder and you can see that the dependencies are not anywhere here in the folder that's because i'm using a virtual environment that actually saves it to a different location so it's not here and you might be doing the same as well or you might be using the libraries directly in your base python interpreter so we have to find a way to install those dependencies into a local directory now if you go back to the readme in this github project this fast api aws lambda github project i have in the comments i've actually pasted a few useful commands that we can use to do all those things so if we run pip install with a t flag and a folder name it's going to actually install the files or the dependencies we want into that subdirectory so i'm going to go ahead and do that and i'm also going to install it from a requirements.txt rather than individually although you can do that as well so first i'm going to add mangum the library that we just installed to our requirements.txt and then in my terminal i'm going to type pip install t libraries which is going to be standing for the libraries of this project and then r requirements.txt and once that's done if you go back to your project you should see this new lib directory created with basically all of the python dependencies we need for this project so we're going to have to zip all of that up and upload it to lambda but because this is installed as sort of like a transitory library we're not actually using this in our project i'm going to want to add it to my git ignore so that i don't accidentally commit this and just have a bunch of useless code going around with me in my project so we're just gonna add lib to that and that should just turn gray okay so now how do we zip this up when i zip this up i actually want all of these files all of these folders expanded in the root path so even though i've put them in this lib folder here when we have it in our lambda function for our main.py to be able to access it it can't be in the lib folder it should just be in the space directory so if you go back to this readme the next command will tell you how to do that we'll basically have to change directory into the library file and then zip it there but then we're going to zip it into a file called lambda function in the sort of the previous the parent directory and this dash r means recursive so we zip everything in every file there as well and the dot just means do it in that directory so let's go ahead and actually run this in our terminal okay once that's finished running i'll go back to my project again and i can see that there's a new lambdafunction.zip file here now i'm also going to add the zip file to our ignore list because i don't want to commit that one either and now i actually the only thing i have to do now is just add this main.py to that zip file so again back to the readme there is one last command we have to run it's zip lam the function.zip dash u and then main.py so the dash u says that don't replace the zip file just update it or add new things to it and this is the file we want so just go ahead and copy that one so zip lambda function dash u and then our main.py file okay and now our api if you followed the last tutorial it actually needs a book.json file locally to act as its database storage which this is actually not a good way to do it with aws lambda because there's no concept of hard disk on lambda every time the function runs you can pretty much think of it as running a whole new computer so anything we save or write to disk is pretty much not going to exist after that function terminates maybe for 15 minutes while the lambda is still warm which is how long a function stays alive for on that machine before lambda kind of recycles it and creates a new one but the bottom line is we can't really write or read files from there and expect it to persist uh it's just that that's not a problem i'm trying to address in this particular tutorial so we're just going to ignore it for now i'm just kind of letting you know ahead of time for the time being this books.json will work nicely with our main py to provide a data source for our api so let's go ahead and add that to our zip as well okay so now i finished adding those files to my zip and if i open the zip folder up in my browser i can actually see all of the dependencies along with my main.py file and mybooks.json data file so now this zip file is ready to go if i put this on lambda i can just run it so let's go back to our lambda function in the aws console and in our code source go to this button that says upload from and then here you can choose a zip file so click on that and then select your zip file to upload and hit save and now when it's finished you're gonna see that the code source doesn't actually let us look or modify the package contents anymore it's just a zip file at this point but that's okay because we already know what's in it from when we built it locally now let's go ahead and run the function again and see what happens this one still fails but if you open up the log you're going to find that it's a different error this time it says the adapter was unable to infer a handler to use for the event this is likely related to how the lambda function was invoked are you testing locally make sure your request payload is valid for a supported handler uh so translated into english this basically means the payload we're giving like the stuff we're giving to lambda this stuff is not something it understands it can't parse this it doesn't understand the http path the routes the headers uh it's expecting that information but it's not there so what we can actually do so that we can test using this interface is create a new event and then if you go to the template there's one called api gateway aws proxy which this is actually the kind of information that we're going to get when we hook up the lambda function to an actual api endpoint but this is a template so we're going to have to modify a couple of things first of all we're going to probably have to pick a path to use and an http method to use as well i want to do something really simple so i want to just pick this um maybe this root path so i'm going to turn the path into just my root slash directory and then i'm going to make it a get request so let's go ahead and modify this payload to do that now the payload structure so that this information is actually repeated several points throughout the json uh data so you're just gonna have to go through and change each of the times you see those fields and don't worry if you don't understand all the other stuff that's going on here you don't have to touch any of that at this point so now that's been modified i'm just going to save this event oh i have to come up with a new name for it i'm going to call it fast api http payload hit save now i'm going to test it again this time it's successful and if we go to the details you can see that the response is welcome to my bookstore app so there you can actually see that it's successfully figured out that it needs to call this function and it's returned this message from us so now our fast api is working on aws lambda i can also change it to a different path so for example maybe list books i'll copy that over here so let's say we wanted to test that we can change our event and we'll just make our path list books but we have to change it everywhere it appears i think it appears three places in total in this payload okay and then we hit save then test again and now you can actually see it list all the books that we've bundled up in our json folder so far we're doing pretty well we have a fast api application now wrapped up in a handler and we've put it into a lambda function so we've tested it and it works we can run this and we don't even need to have a server to run it and it's in the cloud the last thing we need to finish this project off is to actually make a public http endpoint so that we can actually call this api anywhere with http connection so from a browser from another app from a front end so let's get that working now this actually used to be a pretty complicated thing to do before we would probably have to use another aws service called api gateway and we'd have to configure that and make it connect to the lambda with something called like a proxy test those interactions separately and make sure that works but today there's actually a new feature in lambda that makes it really really easy to create an http endpoint right out of the box if you go to configuration there's a tab here called function url and you really don't have to do anything you just hit create function url and here we can select off type none and then configure cross domain origin access just leave that as the star and pretty much leave everything else as default and it's gonna just give you a bunch of other information you don't have to pay attention for now you just hit save and now we are done we already have and a function url that we can use so let's go ahead and check that out in our browser so i've opened up that function url and i'm going to zoom in and you can see that it's a public url that responds to this so you can actually view this from anywhere try it on a phone or a different computer you can actually access that here some of you might be wondering how do i get rid of this ugly api url and have my own domain name in that case i'm not quite sure you might still have to go with api gateway and then hook it up with route 53 in order to get that dns resolution but if your goal is just to get an api that you can use internally or as part of a bigger app or service then this api is good to go it's public and it's behind an https protocol right out of the box and we can test this further by actually typing in routes like list books and you can see all the books that we have here in that json file we can also try some of the other routes we have there like a random book and that one works as well and now our api is ready to go but do you remember what i said before about this json file and this lambda function sort of not having a persistent state that's actually kind of important because lambda doesn't keep its server like when i call this api what happens behind the scenes is that lambda says hey we're receiving a request to run this function let's provision a virtual server to run this and on that virtual server it's going to copy all of this code that we had including that json file and then we can run it we can read from the file we can even write to it but as soon as that function's finished that environment will no longer exist it's going to be recycled by lambda so anything that we do to change that will be lost and the next time the function is run it's going to kind of be fresh from here again so if you're using a lambda function you can't rely on something like this saving to a local disk even though i kind of ignored that and just used it in this project what you actually want is to have this connect to a database amazon actually has a lot of databases that work really well with lambda but you can also use it with anything you're familiar with like postgres or sql or anything like that so you're going to need to have some other separate mechanism to store your data and you can't really rely on the local drive to do that and that's pretty much it on how to deploy a fast api application to aws lambda i hope you found this tutorial useful and if you have any questions or comments please let me know in the comments below if you need help at any point then check in my video description for links and project source code anyways i hope you found this useful and thank you for watching

Original Description

In this project you'll learn how to deploy your FastAPI on AWS Lambda so you can host it serverlessly and not have to stress about server maintenance. 💻 Code: https://github.com/pixegami/fastapi-tutorial 🛠 AWS Lambda: https://aws.amazon.com/lambda/ 🎨 My Terminal Theme: https://youtu.be/UvY5aFHNoEw 📽 Related Videos 👉 FastAPI Tutorial: https://youtu.be/34cqrIp5ANg 👉 AWS Lambda Tutorial: https://youtu.be/S0rlj67cTHw 👉 AWS Lambda with DynamoDB (database): https://youtu.be/CjVPMocEECM 📚 Chapters 00:00 Introduction 01:31 Getting started 04:03 Using mangum to adapt the app 05:13 Create an AWS Lambda function 06:39 Adding our FastAPI app to Lambda 09:22 Uploading Python environment to Lambda 16:06 Testing the function 18:56 Adding HTTP endpoint 20:31 Wrapping up #fastapi #aws #lambda
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from pixegami · pixegami · 18 of 60

1 How to Build an AWS Lambda Function in Python in Just 7 Minutes!
How to Build an AWS Lambda Function in Python in Just 7 Minutes!
pixegami
2 AWS CDK Tutorial: Deploy a Python Lambda Function using AWS
AWS CDK Tutorial: Deploy a Python Lambda Function using AWS
pixegami
3 I used GPT-3 to Write Poetry • Is AI the Future of Creative Writing?
I used GPT-3 to Write Poetry • Is AI the Future of Creative Writing?
pixegami
4 Create NFT Generative Art with Python! (Full Tutorial)
Create NFT Generative Art with Python! (Full Tutorial)
pixegami
5 Build an AI-driven SaaS Application: FULLSTACK Tutorial with Python, React, and AWS
Build an AI-driven SaaS Application: FULLSTACK Tutorial with Python, React, and AWS
pixegami
6 NextJS and TailwindCSS: How to Build a Portfolio Site from Scratch
NextJS and TailwindCSS: How to Build a Portfolio Site from Scratch
pixegami
7 Python Web Scraping Tutorial • Step by Step Beginner's Guide
Python Web Scraping Tutorial • Step by Step Beginner's Guide
pixegami
8 Build Wordle in Python • Word Game Python Project for Beginners
Build Wordle in Python • Word Game Python Project for Beginners
pixegami
9 How to create 1000+ unique NFT-style images (like Cryptopunk) | Python Tutorial
How to create 1000+ unique NFT-style images (like Cryptopunk) | Python Tutorial
pixegami
10 Top 10 Python Modules 2022
Top 10 Python Modules 2022
pixegami
11 How to Send SMS Text Messages with Python & Twilio - Quick and Simple!
How to Send SMS Text Messages with Python & Twilio - Quick and Simple!
pixegami
12 How To Write Unit Tests in Python • Pytest Tutorial
How To Write Unit Tests in Python • Pytest Tutorial
pixegami
13 How to Style Your React Landing Page with Tailwind CSS
How to Style Your React Landing Page with Tailwind CSS
pixegami
14 FastAPI Python Tutorial - Learn How to Build a REST API
FastAPI Python Tutorial - Learn How to Build a REST API
pixegami
15 How to Deploy FastAPI on AWS EC2: Quick and Easy Steps!
How to Deploy FastAPI on AWS EC2: Quick and Easy Steps!
pixegami
16 PyScript • How to run Python in a browser
PyScript • How to run Python in a browser
pixegami
17 My Custom Ubuntu Linux Terminal with Themes and Plug-ins 💻
My Custom Ubuntu Linux Terminal with Themes and Plug-ins 💻
pixegami
Deploy FastAPI on AWS Lambda ⚡ Serverless hosting!
Deploy FastAPI on AWS Lambda ⚡ Serverless hosting!
pixegami
19 NextJS Firebase Auth Tutorial • How to Authenticate Users for Your App
NextJS Firebase Auth Tutorial • How to Authenticate Users for Your App
pixegami
20 AWS Lambda Python functions with a database (DynamoDB)
AWS Lambda Python functions with a database (DynamoDB)
pixegami
21 How To Build a CRUD (TO-DO) App on AWS using FastAPI and Python
How To Build a CRUD (TO-DO) App on AWS using FastAPI and Python
pixegami
22 How to Make a Discord Bot with Python
How to Make a Discord Bot with Python
pixegami
23 How To Use GitHub Copilot (with Python Examples)
How To Use GitHub Copilot (with Python Examples)
pixegami
24 PyTest • REST API Integration Testing with Python
PyTest • REST API Integration Testing with Python
pixegami
25 Python Beginner Project: Build a Caesar Cipher Encryption App
Python Beginner Project: Build a Caesar Cipher Encryption App
pixegami
26 Decorators in Python: How to Write Your Own Custom Decorators
Decorators in Python: How to Write Your Own Custom Decorators
pixegami
27 NextJS 13 Tutorial: Create a Static Blog from Markdown Files
NextJS 13 Tutorial: Create a Static Blog from Markdown Files
pixegami
28 Exploring ChatGPT for Coding and Business ✨ 8 Real Examples!
Exploring ChatGPT for Coding and Business ✨ 8 Real Examples!
pixegami
29 How I Would Learn Python (if I had to start over) • A Roadmap for 2023
How I Would Learn Python (if I had to start over) • A Roadmap for 2023
pixegami
30 Build an AI Pokemon Generator with Python and Midjourney
Build an AI Pokemon Generator with Python and Midjourney
pixegami
31 Why You Should Learn Python in 2023 (as your first programming language)
Why You Should Learn Python in 2023 (as your first programming language)
pixegami
32 ChatGPI API in Python ✨ How to Build a Custom AI Chat App
ChatGPI API in Python ✨ How to Build a Custom AI Chat App
pixegami
33 Learn Python • #1 Installation and Setup • Get Started With Python!
Learn Python • #1 Installation and Setup • Get Started With Python!
pixegami
34 Learn Python • #2 Variables and Data Types • Python's Building Blocks
Learn Python • #2 Variables and Data Types • Python's Building Blocks
pixegami
35 Learn Python • #3 Operators • Add, Subtract and More...
Learn Python • #3 Operators • Add, Subtract and More...
pixegami
36 Learn Python • #4 Conditions • If / Else Statements
Learn Python • #4 Conditions • If / Else Statements
pixegami
37 Learn Python • #5 Lists • Storing Collections of Data
Learn Python • #5 Lists • Storing Collections of Data
pixegami
38 Learn Python • #6 Loops • How to Repeat Code Execution
Learn Python • #6 Loops • How to Repeat Code Execution
pixegami
39 Learn Python • #7 Dictionaries • The Most Useful Data Structure?
Learn Python • #7 Dictionaries • The Most Useful Data Structure?
pixegami
40 Learn Python • #8 Tuples and Sets • More Ways To Store Data!
Learn Python • #8 Tuples and Sets • More Ways To Store Data!
pixegami
41 Learn Python • #9 Functions • Python's Most Important Concept?
Learn Python • #9 Functions • Python's Most Important Concept?
pixegami
42 Learn Python • #10 User Input • 4 Ways To Get Input From Your User
Learn Python • #10 User Input • 4 Ways To Get Input From Your User
pixegami
43 Learn Python • #11 Classes • Create and Use Classes in Python
Learn Python • #11 Classes • Create and Use Classes in Python
pixegami
44 Learn Python • #12 Final Project • Build an Expense Tracking App!
Learn Python • #12 Final Project • Build an Expense Tracking App!
pixegami
45 Stripe & Firebase Tutorial • Add Payments To Your NextJS App
Stripe & Firebase Tutorial • Add Payments To Your NextJS App
pixegami
46 How To Use GitHub Actions • Automate Your AWS Deployments
How To Use GitHub Actions • Automate Your AWS Deployments
pixegami
47 How to Run a Python Docker Image on AWS Lambda
How to Run a Python Docker Image on AWS Lambda
pixegami
48 My MacOS Terminal Setup for HIGH Productivity
My MacOS Terminal Setup for HIGH Productivity
pixegami
49 Host a Python Discord Bot on AWS Lambda (Free and Easy)
Host a Python Discord Bot on AWS Lambda (Free and Easy)
pixegami
50 Python FastAPI Tutorial: Build a REST API in 15 Minutes
Python FastAPI Tutorial: Build a REST API in 15 Minutes
pixegami
51 Pydantic Tutorial • Solving Python's Biggest Problem
Pydantic Tutorial • Solving Python's Biggest Problem
pixegami
52 How to Get Started with AWS • Crash Course
How to Get Started with AWS • Crash Course
pixegami
53 Python Requests Tutorial: HTTP Requests and Web Scraping
Python Requests Tutorial: HTTP Requests and Web Scraping
pixegami
54 Amazon Bedrock Tutorial: Generative AI on AWS
Amazon Bedrock Tutorial: Generative AI on AWS
pixegami
55 How to Publish a Python Package to PyPI (pip)
How to Publish a Python Package to PyPI (pip)
pixegami
56 Langchain: The BEST Library For Building AI Apps In Python?
Langchain: The BEST Library For Building AI Apps In Python?
pixegami
57 RAG + Langchain Python Project: Easy AI/Chat For Your Docs
RAG + Langchain Python Project: Easy AI/Chat For Your Docs
pixegami
58 Python Dataclasses: Here's 7 Ways It Will Improve Your Code
Python Dataclasses: Here's 7 Ways It Will Improve Your Code
pixegami
59 Build a Custom AI RPG Game with OpenAI GPTs
Build a Custom AI RPG Game with OpenAI GPTs
pixegami
60 Create a Custom AI Assistant + API in 10 Mins
Create a Custom AI Assistant + API in 10 Mins
pixegami

In this video, you'll learn how to deploy your FastAPI application on AWS Lambda for serverless hosting, using Mangum and API Gateway. You'll modify your FastAPI application to work with AWS Lambda and handle requests with Mangum.

Key Takeaways
  1. Install Mangum using pip
  2. Create a handler function using Mangum wrapper
  3. Upload FastAPI application to AWS Lambda
  4. Create a Lambda function from scratch with Python 3.9 runtime
  5. Create a test event to test Lambda function
  6. Edit runtime settings to change handler name
  7. Install dependencies using pip install -t libraries
  8. Create requirements.txt and install dependencies using pip install -r requirements.txt
  9. Zip the project dependencies and upload to Lambda
  10. Add main.py to the zip file and update it
💡 AWS Lambda can be used with various databases, including Amazon's own databases and external databases like Postgres or SQL, and has a new feature that allows creating an HTTP endpoint directly without using API Gateway.

Related AI Lessons

Chapters (9)

Introduction
1:31 Getting started
4:03 Using mangum to adapt the app
5:13 Create an AWS Lambda function
6:39 Adding our FastAPI app to Lambda
9:22 Uploading Python environment to Lambda
16:06 Testing the function
18:56 Adding HTTP endpoint
20:31 Wrapping up
Up next
This Cop Was Held Accountable For His Brutality! #police #lawyer
Hampton Law
Watch →