From the course: AWS Certified Developer - Associate (DVA-C02) Cert Prep

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Hands-on lab: Deploying codes with to AWS Lambda

Hands-on lab: Deploying codes with to AWS Lambda

- [Instructor] In this demo, we will learn how to deploy a code that uses an external dependency to AWS Lambda. So what we have here is a Python code that uses an external package called PyMySQL. PyMySQL is not a built-in package, so you still have to download it to be able to use it. PyMySQL, as you can already guess, is a package that lets you connect to a MySQL database using Python. In this case, we are using PyMySQL to connect to a remote MySQL database, specifically an RDS database hosted in the US East 2 region, and you can see that in its endpoint here. And just to explain what this code does, the first line sets up the necessary information that will let us access the database. Just like how we would normally initialize a database connection, we need to provide the endpoint of the database that we're connecting to; our username, the port number of the database, by default, this is 3306, and lastly, a…

Contents