-: In the last section
we had a very long discussion about the existence
of VPCs and how security groups are used with them.
So we're now going to start to create our RDS
service that's going to be essentially a managed version
of Postgres and then if we have enough time,
we'll do our Redis instance inside of Elastic Cache as well.
So to get started, I'll flip back over to my AWS dashboard.
I'm gonna make sure that I'm still inside the same region
as my Elastic Beanstalk instance that I already created.
And then on the services drop down
at the top I'll do a search for RDS.
Again, that stands for Relational Database Service.
All right, so once over here you'll see
like a ton of different popups
a whole bunch of different stuff going on.
If you see this kind of notification
or anything like that you can just close it
at the top and then we'll scroll down a little bit
and find a section marked as Create Database
which is of course what we definitely want to do.
So I'm gonna click on Create Database.
We then have to select the type
of database that we want to create.
So we can make a MySQL, Oracle, Microsoft SQL Server.
You could do Amazon Aura, which is a fork I believe
of my SQL, specifically customized for AWS.
But of course, for you
and me we wanna make a Postgres instance.
So I'll select Postgres over here.
And then you get your little marketing spiel down here.
I do recommend that you check this box down here
to enable only options for free tier usage.
Now again, if your AWS account is over one year old
you do not qualify for free usage tier.
You will see this option right here
even if you do not qualify for free usage.
So my AWS account is many years old.
I do not qualify for the free usage tier
but I still see the checkbox right here.
I'll click next on the bottom right.
And then we get asked to enter in a couple of details.
So if you wanted to change the default version used
you could do it right here
but the default version is totally appropriate for us.
And then go a little bit lower and find DB instance class.
Because we checked the only enable options eligible
for free usage tier.
The only class that we get is this T2 Micro
which is essentially a very tiny virtual machine.
Not a lot of power behind it.
Maybe not the best instance to use
if you expect a lot
of traffic to come today to your database.
Well then scroll down a little bit more.
You can see allocated storaged right here.
We definitely do not need 20 gigabytes
for our application but it is the minimum.
So we'll leave it as that.
We can then specify a couple of different settings in here.
So stuff like DB instance, identifier, blah
all this other stuff.
The only thing that we really care
about is the master username and the master password.
The username and the password right here maps up against
you might recall, inside
of our Docker composed file at our API right here
you'll recall we had the Postgres username,
the database, and password.
So those entries that we're gonna enter
in over there map up these environment variables
that we're going to eventually have
to get into the API container at some point in time.
So these are very meaningful pieces
of information over here.
Let's fill in the instance identifier first.
I'll call this about just multi docker RDS.
Or how about multi Docker Postgres?
We'll do a username here.
You can do any username and any password you want.
Just keep in mind you have
to remember these because we need to pass them off
to the API service when it gets created
on Elastic Beanstalk and at some point in the future.
So I'm going to use a username
of Postgres and I'm going to use a master password
of Postgres password, Postgres password.
And then I'm gonna flip on over
and just create a new temporary document
over here just to remind myself about those values.
So my username is Postgres
and my password is Postgres password.
Again, you're going to need these pieces
of information in just a little bit.
So then we'll click on next.
Now, you might get some other options on here.
We want to put this new database inside of our default VPC
cuz we want it to talk to every other service out there.
Ideally, we would assign a subnet group
but that's just a little bit outside
of this scope of what we're doing in this course.
So we'll leave it on default.
And for public accessibility, we're going
to be very a hundred percent sure that no is selected
because we do not want this thing to be publicly accessible
by any other service
beyond the ones that we assigned to our security group
which we discussed just a little bit ago.
And then finally down here you'll see VPC Security groups.
Now we are going to eventually make our own custom
VPC security group
and allocate everything to it, but you can just
select create new VPC security group for now.
But we're going to essentially override
that thing, or at least change its rules.
Now, just a little bit more settings on here.
We have to specify a database name.
This is the same database name that we had to specify over
inside of our Docker composed file that was just talking
about a moment ago.
So this is the PG database right here.
So for my database name, I'll do something like
I don't know Fib values.
I think that's reasonable and I'm gonna make sure
that I record that is Fib values
because again we're going to need all this information
in just a little bit.
I'm gonna make sure that I leave the default port
on here no reason to change it.
And then we don't have to do anything with encryption.
If you wanna set up backups, this is where you would do it.
Remember I had said that with these managed solutions
they will automatically make backups for you
so that you can easily re roll back information
if anything really goes wrong in your application.
The default is seven days.
You can go all the way down to like, oh, not zero days.
One day, I suppose, you can actually do even more
fine grain details than that, I believe if you are
willing pay some money
we'll leave it as the default of seven days.
And that's pretty much all we have to do here.
So I'll click on create database at the very bottom
and then it's going to say, Hey, it's gonna take a couple
of minutes to do this, which is totally fine.
I can then click on all database instances
and we'll see the new database we just created right here
and it has a status of creating.
Okay, so that's it for RDS.
We're gonna let this thing do its bit
Let's take a quick pause right here.
We'll come back to the next section
and do our Elastic Cache setup for Redis as well.
So I'll see you in just a minute.