A Detailed Walkthrough for Creating Your First RDS with AWS

We walk through the AWS Console

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the Serverless Django with Zappa course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Serverless Django with Zappa, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Serverless Django with Zappa
  • [00:00 - 00:07] Okay, so let's create an RDS database. We're going to be very careful to configure the database so it's going to be covered by the free tier, so it won't cost anything.

    [00:08 - 00:17] Remember, AWS offers the RDS service free for 12 months. And by free, I mean you can run a very small RDS instance for free.

    [00:18 - 00:28] AWS has other data store options like DynamoDB and Neptune, but the only officially supported database by Django are relational databases. So we'll start with that.

    [00:29 - 00:42] RDS also supports many types of database engines, but for this course, we're going to choose a well supported and common engine, Postgres QL or Postgres. I want to say a very important note at this point.

    [00:43 - 00:57] We're going to go through this process and set up this database in a very insecure fashion. We do this because we're focusing on the process of creating the RDS instance, and in the next module, we'll learn how to properly create an RDS instance that is secure.

    [00:58 - 01:09] So for the purposes of this module, we're going to create an RDS instance, and we're going to configure it and connect to it. And then at the end of the module, we should delete this database.

    [01:10 - 01:31] And one more thing, when we create this RDS instance, it can actually be shared between multiple Zappa projects, because each Zappa project has a Django application on it, and the Django application generally connects to only a single database. And any of these RDS instances can actually host multiple databases.

    [01:32 - 01:41] So our goal for this course is to create an RDS instance called Newline Course Zappa. And on that instance, we'll create a database called Zappa Course DB.

    [01:42 - 01:50] So go ahead and log in to the AWS console and navigate to the RDS service. We're going to walk through step by step how to create a database.

    [01:51 - 02:00] It's not very complicated, but we want to make sure we do it properly, otherwise we may run into issues later. So first click on create database.

    [02:01 - 02:12] For the database creation method, select standard create. For the engine option, select Postgres.

    [02:13 - 02:23] For the version, you may select the latest stable version. For this course, we're going to use 12.5-R1.

    [02:24 - 02:37] For your templates, select free tier. For the DB instance identifier, we're going to use newline-course-zappa.

    [02:38 - 02:50] For your own DB instance identifier, you can use this as well, or you can pick whatever you'd like. For the credentials setting, we're going to use Postgres as the master username .

    [02:51 - 02:56] Ideally, in your own instance, you'd pick something different that's not the default. That would make it a little more secure.

    [02:57 - 03:08] For the password, I'm going to pick a strong password that I randomly generated . For the DB instant class, because we're using the free tier, the console has selected it for you.

    [03:09 - 03:16] You can't change to a different class because these are not in the free tier. For storage, we don't necessarily need auto scaling.

    [03:17 - 03:26] This is not going to be a giant database, so I'm going to uncheck that. For connectivity, we're going to leave the default VPC, and we're going to leave the default subnet group.

    [03:27 - 03:40] I want to connect to this database using my zapper project, so I need to turn on public access. This is not a great idea for any sort of production database, or even a development database that you're planning to keep around for longer than this whole lesson takes.

    [03:41 - 03:46] For a VPC security group, you can all leave this as the same. For database authentication, keep it as password authentication.

    [03:47 - 03:51] And we do have some additional configuration options we'd like to configure. So go ahead and open that.

    [03:52 - 04:12] The initial database name should be zapper course DB camel case, and we don't need automatic backups, so we can uncheck this and we don't need performance insights. We can leave the rest of the options as the default selections.

    [04:13 - 04:24] Under the bottom of the form, Amazon reiterates that this free tier is available for 12 months. And with that, I'm going to click on create database.

    [04:25 - 04:33] Okay. Now Amazon is off creating our RDS instance.

    [04:34 - 04:39] It'll take a few minutes to launch, and we're on to the next lesson.