‫So in the DynamoDB console,
‫on the left-hand side, you have DAX.
‫And DAX is not part of the free tier,
‫so creating a DAX Cluster is not going to be free,
‫but you can just go ahead and see the process.
‫So you create a cluster, for example, DemoDAX
‫and then the node family,
‫so which kind of nodes do you want to attribute
‫into your DAX cluster.
‫It could be t-types or r-types.
‫So r is memory and t is for bursting,
‫so this is recommended for use case
‫regarding a lower throughput,
‫and this is for always-ready capacity, okay?
‫Or we can compare all families,
‫and in here, you can select the node types you want.
‫So you want an r5.large and I have r5.4xlarge and so on
‫or would you want to have a t2.small and so on.
‫So in this example, I'll take a t2.small
‫and then the cluster size.
‫So do you want 1 up to actually 11 nodes,
‫so they keep on increasing the capacity.
‫Three is going to give you a multi AZ setup, right,
‫but one is going to be good for example,
‫just one AZ or for development.
‫But if you have one or two nodes,
‫you might experience reduced availability, okay?
‫So let's go ahead with one node.
‫I'm just going to go ahead and create this for you,
‫but you don't have to go ahead
‫because this will cost you some money.
‫Now the subnet group is,
‫which subnet group do you want to associate it with?
‫So demosubnetgroup,
‫so this has to live within a specific subnet group
‫and in a VPC, so you choose your VPC ID
‫and then you choose the subnets you want to have.
‫Obviously, three subnets means you can have three nodes
‫and be in a highly available setup.
‫Access control, so what is a security group
‫to access your DAX cluster
‫and you need to open up port 8111, okay,
‫or 9111 if you do in-transit encryption.
‫So we need to go ahead and create a security group
‫from the EC2 console.
‫But right now, I'll keep it simple
‫and just use the default security group,
‫just to show you the process.
‫And then AZ allocation,
‫do you want to have automatic
‫or do you want to spread your nodes manually?
‫So we'll keep it as automatic.
‫Next, for IAM permissions,
‫so you need to provide an IAM Service role
‫that will give the DAX cluster access to DynamoDB.
‫And so therefore, we are just going to create
‫this IAM role called DAXtoDynamoDB,
‫and the policy will be created.
‫We'll provide read/write rights
‫and we're going to give access to all tables,
‫but we could obviously limit some tables if we needed to.
‫Then we're going to encrypt data in transit and at rest
‫on our DAX cluster,
‫so this is good.
‫And then for parameter groups,
‫we're going to choose the existing one, so this one.
‫And we could, on the left-hand side,
‫define some more parameters, thanks to parameter groups.
‫So this is going to basically tell
‫how long to cache the items, thanks to the time-to-live,
‫and what's the query time-to-live as well.
‫So this is what settings you have
‫as part of the parameter group.
‫But by default, the 1.0 is giving you five minutes of TTL
‫on both item time and query time.
‫Okay, the maintenance window,
‫so obviously DAX will be occasionally patched and upgraded,
‫and so this is why it's good to have
‫a multi AZ kind of setup.
‫And so you can say no preference
‫or specify your time window, your tags,
‫and then you're good to go.
‫You can review it and create your cluster.
‫So my DAX cluster is now created,
‫and let's have a look.
‫So the important thing I want you to look at
‫is here there is a cluster endpoint,
‫and this is the endpoint your application should leverage
‫to just leverage the DAX feature.
‫Now we can have a look at the nodes,
‫so we can have a look at the node types,
‫how many vCPU per node, memory, and so on.
‫So we can add nodes over time if we wanted to,
‫but as we can see,
‫we cannot change the node types, okay?
‫And we need to create a new DAX cluster if you wanted to.
‫We can have some monitoring,
‫so we can do alarms and metrics
‫around whether or not the cache is being used correctly,
‫so cache hits, cache misses, for items and queries,
‫CPU utilization, and so on.
‫So this is very, very handy
‫to see if DAX is effective for you.
‫Events, to monitor the events of your database,
‫as well as settings if you wanted to modify some settings
‫such as a parameter group, network configuration,
‫security configuration, maintenance window, and tags, okay?
‫So that's it for DAX.
‫I hope you liked it.
‫Now I'm just going to delete this cluster
‫including all the CloudWatch alarms,
‫and I will see you in the next lecture.