Instructor: So now let's create an Aurora database.
So we'll use standard create
to have all the options available to us
and we'll choose Amazon Aurora.
So, we have two editions of Aurora,
we have Aurora MySQL-Compatible Edition,
or Aurora PostgreSQL-Compatible Edition.
For this, I'm going to use Aurora MySQL-Compatible Edition
because there are more features to show you.
So first of all, the capacity type.
And we'll see some advanced features in the next lecture
but we can have a look at a preview
at them in this hands-on.
So we either provision and we manage
the server instance sizes, or we have serverless
and then automatically, Aurora will scale the capacity
based on the database load, which is a great option
for intermittent or unpredictable workloads.
So to keep things simple, I'm going to use it as provision
because it does give us more option
but serverless is quite a heavy feature.
Then we have replication feature
and currently we have single-master,
which is what I told you,
that we can write only to a single writer instance,
which is good for general purpose option
for most workloads, okay?
But then if you have multi-master you supports to write
to multiple writer instances
and this is good when you have
continuous writer availability that is required.
Now, to keep it with as many options as possible,
I will keep it as a single-master.
Next, we have the engine version, as you can see,
we can choose from 53 versions right now.
And we have different version here
but each version supports different kinds of features.
And actually there's some filter.
So if you use this filter, you can say,
"Hey, I only wanna see versions that supports
"the global database feature,"
which is to spend an Aurora database
across multiple areas, regions,
or we want to only show versions that support
the parallel query feature and so on.
So, for this, I'm going to just show versions
that support the global database feature
and choose whatever Amazon Aurora recommends for me.
So I'll choose this one, for example.
So next I'm going to scroll down
and we have different templates,
so production or Dev/Test,
as you can see,
there is no free feature for Aurora.
So we'll use production and see all these features,
So the database identifier is going to be database-2.
Then the username is going to be admin,
the password again is going to be password.
So let me enter a password.
Then I will scroll down.
And here we choose the database instance class.
So we have memory and burstable classes
where we trying to keep the cost as low as possible
if you want to follow along.
So choose a dB.t3.small with me,
which is the smallest instance that you can have right now.
But again, if you go ahead and create a database,
just make sure that you are going to incur some costs.
Next, for availability and durability.
So do you want to create a Multi-AZ deployment?
And obviously this is best practice.
So you can say,
"No, I don't want to have an Aurora replica,"
or "Yes, please set up an or replica,
"or reader node in a different AC,"
and I'm going to do it,
which is recommended for scaled availability.
This is going to give you fast,
failover and high availability.
But of course, it's going to cost you more money.
No matter what, if you don't use an Aurora replica,
just know that your storage layer is no matter what,
replicated across three AZ, that's a guarantee.
So I will choose to create an Aurora replica, perfect.
Then a VPC, a sub-net group.
Do you want to make it publicly accessible?
Yes or no.
I'm not going to access it.
So I'm not going to say yes, but you could,
if you wanted to.
Next, a security group.
I will select a new security group, I'll call it,
demo-aurora-mysql,
which is all gain on port 3306.
Now for database authentication,
we can access Aurora using either a password, which we know,
or a password and IAM database authentication,
which is very handy as well.
We have additional options,
which is just specify initial database names,
for example, my DB, sometime it's our groups,
which is out of scope.
Failover again, is out of scope.
Backup is just how many days you should retain backups
for this instance.
So one day is good enough
but you have all the way to 35 days.
Do we want to increase the database? Yes.
And with what key?
This one is perfect.
Do we want to backtrack this database quickly
in point of timing?
In which case you need to say,
yes, I'd like to enable backtrack for my database
and say up to 72 hours,
I wanna be able to backtrack back in time.
But you can disable it as well, I'll disable it.
Do we want to have an enhanced monitoring?
Do you have a more greener IOT on your monitoring? Yes.
What do you want to do with the logs?
Do you want to send them to CloudWatch logs? Yes.
Maintenance, maintenance window, we know this
and whether or not we want to enable deletion protection.
This time I will disable this.
Now let's create this database,
and as you can see,
it's going to take a little bit of time.
So what I'm going to do is pause the video while it happens.
So my Aurora database is created.
And as we can see, we have regional cluster
with a writer instance and a reader instance.
So here, the important fact is that,
we have different instance to write and to read from,
and they're in different AZ.
So this is the whole power of Aurora.
So if you click on Database 2.
As we can see to connect, we have two end points.
We have a reader end points and a writer end point.
So these end points are very handy
because they represent an endpoint
that will always lead to the right reader instance,
a writer instance,
and this end points will always lead
to the right reader instance.
So these end points is what your application
should be using to connect to Aurora.
But if you were to click directly
on this specific instance right here,
this instance will have also a dedicated end points.
And that instance over here would also have
a dedicated end points, once it is being created.
So it's all being in the creating space.
So we have these features that are cool.
Vic, we have other features.
So we can add more readers into our reader cluster
to add on with scaling capacity.
And we can also create a cross-Region read replica,
if you want to have a replica in another region.
We can restore any point in time.
And another one is that we could add replica auto scaling.
So this one is very important because well,
we can create a policy and this policy would say,
"Hey, based on the average CPU utilization
of your Aurora Replica,
or the average number of connections
to your Aurora Replica,
then scale your Read Replica."
So say, ReadReplicaScalingPolicy and say,
"I want you to make sure that my Replica stay
at a target value of 60%,
And if I go over, please create more Read Replica.
We could also define a scale in period
for discovering policy, which makes sense.
And what's the min and the max capacity.
So one Replica up to 15 Aurora Replicas.
And this is very handy to have Read Replica
auto-scaling as a database.
So I canceled it, we don't need it right now.
And now I've made sure that both my database
and end points are available,
So we're good to go.
So one last thing I can do to show you
the whole power of Aurora is to do action
and add AWS Region,
and this is only possible if you chose a version of Aurora
that was enabled with the global database feature.
But here we can add the database region to other regions
and this will allow you each get a global Aurora.
Now, as you can see, this is not possible with this cluster,
because we need to have an instance with a compatible size.
To do this first, I need to change the instance,
for example, to a large type of instance
and then we would be able to add other regions
to the database cluster.
But anyway, I wanted to show you the feature right here.
So that's it for Aurora,
this is pretty much what you get,
which is an amazing database with amazing performance.
Great scaling capacity global and so on, serverless.
So really, really complete database.
I really liked this offering from AWS.
Now to be done with this hands-on,
just take this database and you want to delete it,
but as you can see, it's not available.
So what you need to do first is to delete
the reader instance.
So type it delete me,
then you need to delete the writer instance.
So again, action, delete and then you type delete me.
And then once both of these things are deleted,
you are going to be able to delete your whole cluster.
So I will wait when it's done.
That's it, my database is now deleted
and I will see you in the next lecture.