Instructor: Just a very short lecture
on Parameter Groups.
So I talked about them, that basically
you can configure your entire DB engine as we'll see
using Parameter Groups.
And if it's a dynamic parameter,
it can be applied immediately,
but if it's a static parameter
then it will only be applied after you reboot your instance.
So that when the instance reboots basically
it just picks up these parameters.
We can also modify the parameter group
associated with the DB
so we can replace the default one by our custom one
but for this we also must reboot our database.
And to know all the parameters available
for a specific DB technology,
you can look at the documentation or as well
use the AWS console as we'll see in a second.
Now there's one must-know parameter
you need to know for the exam
and that's the one called for Postgres and SQL server,
rds dot force underscore ssl equals 1.
And that's the way to enforce SSL connection
to a Postgres or SQL server database.
You must know this parameter going into the exam.
But as a reminder, it doesn't work for MySQL.
For MySQL or MariaDB, you must run a SQL statement
called Grant Select On database dot star slash to
and then you just at the end say require SSL.
So it's pretty funky that there's
two different ways of doing it, but that's the way it is.
So for Postgres you can use a parameter group,
but for MySQL it's a SQL statement.
Remember this going into the exam.
Now let's just have a quick look at
parameter groups in the console.
So parameter group are accessible from
the left hand side panel.
And as you can see when we create a database,
it creates a default parameter group for us.
And we can click on it and see anything
but we won't be able to change this group.
In this parameters filters you can just type
any parameters and see how it is.
We'll create our own parameter group,
so I'll call it a parameter group
and I need to select my database instance.
So for me it's going to be Postgres 10
because we use 10.4.
The group name as I'll call it,
group demo postgres
and I'll just call it demo group for postgres.
You have to put a description in.
Click on create.
And here I'm basically able in this group
to change any of my parameters to whatever I want.
So as you can see we can change the authentication timeout
to whatever value we wanted if we click on it
and click on edit parameters,
then you're literally able to change
the value you want for anything.
So the one parameter that I want you to look at
is going to be called force underscore ssl.
And as you can see, rds dot force ssl is here.
It's a dynamic type of parameter
so we won't need to reboot our instance.
And it's a boolean and it's to force SSL connections.
So I can just click on it,
edit the parameters and say 1.
And this will force my database
to have SSL connections only.
So this is how I force encryption for Postgres.
Okay, I saved it, so now my parameter group has been saved.
And let's see if that works so I'll just refresh my page.
And then after refreshing my page I'm going
type force underscore ssl again.
Okay, now the value is one, so it means it's enabled.
So now what I can do is assign this parameter group
to my Postgres database.
So what I want to do is take this parameter group
which by the way I can edit, copy, compare, reset or delete.
I want to assign it to my database.
So I go to my database and I click on it and I modify it.
And within it, I can now assign my parameter group.
So let's scroll down and in there I will have here
the DB parameter group and I will say
it's group demo postgres.
Because I changed the parameter group,
I will have to reboot my instance.
So I'm fine, everything else I leave the same.
I'll click on continue and then modify DB instance,
but I will apply immediately instead of applying
during the next scheduled maintenance window.
So I'll do this right now,
modify DB instance,
and now my instance is going to be restarting
or rebooting using this new parameter group,
but this time it will basically have forced SSL connections
which is what I wanted.
So after a few reboots, it turns out that
if you scroll down you see that the parameter group
is group demo postgres and now it's in sync
and now it's using all the parameters
that I have specified.
So that's it for this lecture, I hope you enjoyed it
and I will see you in the next lecture.