Sup fam, let's pick back up on our quest to build meaningful shit. If you've been following along so far, you should already have the smarts to set up an RDS database , as well as the general idea behind what lambda functions are. You should have enough familiarly to dive into the AWS console and create a custom lambda function. For personal preference we'll be using Python 3 to create this endpoint, although the general community does seem to gravitate towards Node in these cases. Node will likely run faster at runtime, but whatever, screw semicolons. To recap, the general architecture here is API Gateway > Lambda > RDS . Lambda is the go-between from when an API call is made, to how it should affect the database. In other words: Creating a GET Endpoint Each method in our API will have it's own lambda function. The scope of a GET function should be relatively simple: Connect to the database Execute the relevant SQL query Map values returned by the query to a dict Return the values as the response body Start a project on your local machine (this is necessary as we'll need to upload a library to import). We're ultimately going to have 3 items: rds_config.py : Credentials for your RDS database lambda_function.py : The logic of your function pymysql : A python library to run SQL queries rds_config.py This is a simple file to store our credentials in case you'd ever like to omit this file from a repo. db_username = 'myUser' db_password = 'jigheu896vf7bd' db_name = 'myDatabase' lambda_function.py This is where the magic happens. For this GET call, we're simply going to get all records from a table in a database and return them in a consumable way for whomever will ultimately use the API. Remember that lambda expects you to specify the function upon initialization. This can be set in the "Handler" field here: Let's build this thing: import sys import logging import rds_config import pymysql # rds settings rds_host = "myDatabase.ghfghghgf.us-east-1.rds.amazonaws.com" name = rds_config.db_username password = rds_config.db_password db_name = rds_config.db_name # logging logger = logging.getLogger() logger.setLevel(logging.INFO) # connect using creds from rds_config.py try: conn = pymysql.connect(rds_host, user=name, passwd=password, db=db_name, connect_timeout=5) except: logger.error("ERROR: Unexpected error: Could not connect to MySql instance.") sys.exit() logger.info("SUCCESS: Connection to RDS mysql instance succeeded") # array to store values to be returned records = [] # executes upon API event def handler(event, context): with conn.cursor() as cur: cur.execute("select * from employees") conn.commit() for row in cur: record = { 'employee_id': row[1], 'employee_info': { 'firstname': row[2], 'lastname': row[3], 'email': row[4], } } records.append(record) return records Check out what's happening in our handler function. We're: Establishing a DB connection Running a select all query for a table in our database Iterating over each row returned by the query Mapping values to a dict Appending each generated dict to an array Returning the array as our response body pymysql The shitty thing about the AWS console is there's no way to install python libraries via the UI, so we need to do this locally. In your project folder, install pymysql by using something like virtualenv: virtualenv lambdaenv source lambdaenv/bin/activate pip3 install mypysql That will install the pymysql library in your environment bin. Copy that into your main directory where lambda_function.py lives. Game time In your project folder, make a zip file of lambda_function.py, rds_config.py, and pysql. Upload your ZIP file via the "Code entry type" field: Save your function and run a test via the top right menu. When asked to specify a test type, select a standard API call. Your results should look like this: Post Functions Creating a POST function isn't much more complicated. Obviously we're essentially doing the revserse of before: we're expecting information to be passed, which we'll add to a database. lambda_function.py import sys import logging import rds_config import pymysql import json # rds settings rds_host = "myDatabase.ghfghghgf.us-east-1.rds.amazonaws.com" name = rds_config.db_username password = rds_config.db_password db_name = rds_config.db_name # logging logger = logging.getLogger() logger.setLevel(logging.INFO) try: conn = pymysql.connect(rds_host, user=name, passwd=password, db=db_name, connect_timeout=5) except: logger.error("ERROR: Unexpected error: Could not connect to MySql instance.") sys.exit() logger.info("SUCCESS: Connection to RDS mysql instance succeeded") def handler(event, context): data = { json.dumps({ 'key': event['id'], 'email': event['email'], 'firstname': event['firstname'], 'lastname': event['lastname'], } with conn.cursor() as cur: sql = "INSERT INTO `workers` (`key`, `email`, `firstname`, `lastname`) VALUES (%s, %s, %s, %s)" cur.execute(sql, (data['key'], data['email'], data['firstname'], data['lastname'])) conn.commit() return { 'statusCode': 200, 'body': data, }) } Parameters in a post function are contained in the event parameter we pass tot he handler. We first create a dict to associate these values. Pay attention to how we structured our sql query for best pymysql best practice. Post functions expect a response body to contain (at the very least) a status code as well as a body. We'll stick to bare minimums here and tell the user is good to go, and recap what was added. For the sake of this demo we kept things simple with an insert query, but keep in mind this means the same record can never be added twice or updated in this manner- you might be better suited by something such as REPLACE. Just something to keep in mind as you're building your app. So... let's do something with this? The hard part is over fam, be proud. The only thing missing here is that we don't actually have API endpoints to hit these sick functions we just made. Tune in next time as we check out API Gateway to put a bow on this bad boy.