1 00:00:00,170 --> 00:00:02,030 ‫So in the DynamoDB console, 2 00:00:02,030 --> 00:00:04,450 ‫on the left-hand side, you have DAX. 3 00:00:04,450 --> 00:00:06,460 ‫And DAX is not part of the free tier, 4 00:00:06,460 --> 00:00:09,140 ‫so creating a DAX Cluster is not going to be free, 5 00:00:09,140 --> 00:00:11,210 ‫but you can just go ahead and see the process. 6 00:00:11,210 --> 00:00:13,900 ‫So you create a cluster, for example, DemoDAX 7 00:00:14,890 --> 00:00:16,180 ‫and then the node family, 8 00:00:16,180 --> 00:00:18,430 ‫so which kind of nodes do you want to attribute 9 00:00:18,430 --> 00:00:19,430 ‫into your DAX cluster. 10 00:00:19,430 --> 00:00:21,520 ‫It could be t-types or r-types. 11 00:00:21,520 --> 00:00:23,810 ‫So r is memory and t is for bursting, 12 00:00:23,810 --> 00:00:25,310 ‫so this is recommended for use case 13 00:00:25,310 --> 00:00:26,560 ‫regarding a lower throughput, 14 00:00:26,560 --> 00:00:30,250 ‫and this is for always-ready capacity, okay? 15 00:00:30,250 --> 00:00:32,200 ‫Or we can compare all families, 16 00:00:32,200 --> 00:00:34,450 ‫and in here, you can select the node types you want. 17 00:00:34,450 --> 00:00:38,940 ‫So you want an r5.large and I have r5.4xlarge and so on 18 00:00:38,940 --> 00:00:41,800 ‫or would you want to have a t2.small and so on. 19 00:00:41,800 --> 00:00:44,180 ‫So in this example, I'll take a t2.small 20 00:00:44,180 --> 00:00:45,370 ‫and then the cluster size. 21 00:00:45,370 --> 00:00:47,900 ‫So do you want 1 up to actually 11 nodes, 22 00:00:47,900 --> 00:00:49,820 ‫so they keep on increasing the capacity. 23 00:00:49,820 --> 00:00:52,930 ‫Three is going to give you a multi AZ setup, right, 24 00:00:52,930 --> 00:00:55,810 ‫but one is going to be good for example, 25 00:00:55,810 --> 00:00:58,100 ‫just one AZ or for development. 26 00:00:58,100 --> 00:00:59,670 ‫But if you have one or two nodes, 27 00:00:59,670 --> 00:01:02,420 ‫you might experience reduced availability, okay? 28 00:01:02,420 --> 00:01:03,790 ‫So let's go ahead with one node. 29 00:01:03,790 --> 00:01:06,610 ‫I'm just going to go ahead and create this for you, 30 00:01:06,610 --> 00:01:08,050 ‫but you don't have to go ahead 31 00:01:08,050 --> 00:01:09,800 ‫because this will cost you some money. 32 00:01:09,800 --> 00:01:11,340 ‫Now the subnet group is, 33 00:01:11,340 --> 00:01:13,570 ‫which subnet group do you want to associate it with? 34 00:01:13,570 --> 00:01:15,540 ‫So demosubnetgroup, 35 00:01:15,540 --> 00:01:18,890 ‫so this has to live within a specific subnet group 36 00:01:18,890 --> 00:01:21,750 ‫and in a VPC, so you choose your VPC ID 37 00:01:21,750 --> 00:01:23,920 ‫and then you choose the subnets you want to have. 38 00:01:23,920 --> 00:01:26,500 ‫Obviously, three subnets means you can have three nodes 39 00:01:26,500 --> 00:01:29,460 ‫and be in a highly available setup. 40 00:01:29,460 --> 00:01:31,720 ‫Access control, so what is a security group 41 00:01:31,720 --> 00:01:33,240 ‫to access your DAX cluster 42 00:01:33,240 --> 00:01:37,250 ‫and you need to open up port 8111, okay, 43 00:01:37,250 --> 00:01:40,500 ‫or 9111 if you do in-transit encryption. 44 00:01:40,500 --> 00:01:42,790 ‫So we need to go ahead and create a security group 45 00:01:42,790 --> 00:01:43,623 ‫from the EC2 console. 46 00:01:43,623 --> 00:01:45,008 ‫But right now, I'll keep it simple 47 00:01:45,008 --> 00:01:46,550 ‫and just use the default security group, 48 00:01:46,550 --> 00:01:48,490 ‫just to show you the process. 49 00:01:48,490 --> 00:01:49,445 ‫And then AZ allocation, 50 00:01:49,445 --> 00:01:51,100 ‫do you want to have automatic 51 00:01:51,100 --> 00:01:53,550 ‫or do you want to spread your nodes manually? 52 00:01:53,550 --> 00:01:55,560 ‫So we'll keep it as automatic. 53 00:01:55,560 --> 00:01:56,650 ‫Next, for IAM permissions, 54 00:01:56,650 --> 00:01:58,660 ‫so you need to provide an IAM Service role 55 00:01:58,660 --> 00:02:02,090 ‫that will give the DAX cluster access to DynamoDB. 56 00:02:02,090 --> 00:02:04,360 ‫And so therefore, we are just going to create 57 00:02:04,360 --> 00:02:08,040 ‫this IAM role called DAXtoDynamoDB, 58 00:02:08,040 --> 00:02:09,740 ‫and the policy will be created. 59 00:02:09,740 --> 00:02:11,150 ‫We'll provide read/write rights 60 00:02:13,013 --> 00:02:15,070 ‫and we're going to give access to all tables, 61 00:02:15,070 --> 00:02:18,670 ‫but we could obviously limit some tables if we needed to. 62 00:02:18,670 --> 00:02:21,000 ‫Then we're going to encrypt data in transit and at rest 63 00:02:21,000 --> 00:02:21,960 ‫on our DAX cluster, 64 00:02:21,960 --> 00:02:23,070 ‫so this is good. 65 00:02:23,070 --> 00:02:24,670 ‫And then for parameter groups, 66 00:02:24,670 --> 00:02:27,690 ‫we're going to choose the existing one, so this one. 67 00:02:27,690 --> 00:02:29,350 ‫And we could, on the left-hand side, 68 00:02:29,350 --> 00:02:32,100 ‫define some more parameters, thanks to parameter groups. 69 00:02:32,100 --> 00:02:34,660 ‫So this is going to basically tell 70 00:02:34,660 --> 00:02:38,370 ‫how long to cache the items, thanks to the time-to-live, 71 00:02:38,370 --> 00:02:39,980 ‫and what's the query time-to-live as well. 72 00:02:39,980 --> 00:02:41,480 ‫So this is what settings you have 73 00:02:41,480 --> 00:02:42,990 ‫as part of the parameter group. 74 00:02:42,990 --> 00:02:46,170 ‫But by default, the 1.0 is giving you five minutes of TTL 75 00:02:46,170 --> 00:02:49,080 ‫on both item time and query time. 76 00:02:49,080 --> 00:02:51,510 ‫Okay, the maintenance window, 77 00:02:51,510 --> 00:02:54,460 ‫so obviously DAX will be occasionally patched and upgraded, 78 00:02:54,460 --> 00:02:55,450 ‫and so this is why it's good to have 79 00:02:55,450 --> 00:02:57,010 ‫a multi AZ kind of setup. 80 00:02:57,010 --> 00:02:58,370 ‫And so you can say no preference 81 00:02:58,370 --> 00:03:01,130 ‫or specify your time window, your tags, 82 00:03:01,130 --> 00:03:02,140 ‫and then you're good to go. 83 00:03:02,140 --> 00:03:05,053 ‫You can review it and create your cluster. 84 00:03:07,290 --> 00:03:09,410 ‫So my DAX cluster is now created, 85 00:03:09,410 --> 00:03:10,243 ‫and let's have a look. 86 00:03:10,243 --> 00:03:12,040 ‫So the important thing I want you to look at 87 00:03:12,040 --> 00:03:15,050 ‫is here there is a cluster endpoint, 88 00:03:15,050 --> 00:03:17,860 ‫and this is the endpoint your application should leverage 89 00:03:17,860 --> 00:03:20,550 ‫to just leverage the DAX feature. 90 00:03:20,550 --> 00:03:21,770 ‫Now we can have a look at the nodes, 91 00:03:21,770 --> 00:03:22,610 ‫so we can have a look at the node types, 92 00:03:22,610 --> 00:03:25,510 ‫how many vCPU per node, memory, and so on. 93 00:03:25,510 --> 00:03:27,740 ‫So we can add nodes over time if we wanted to, 94 00:03:27,740 --> 00:03:28,720 ‫but as we can see, 95 00:03:28,720 --> 00:03:31,100 ‫we cannot change the node types, okay? 96 00:03:31,100 --> 00:03:33,580 ‫And we need to create a new DAX cluster if you wanted to. 97 00:03:33,580 --> 00:03:34,430 ‫We can have some monitoring, 98 00:03:34,430 --> 00:03:36,310 ‫so we can do alarms and metrics 99 00:03:36,310 --> 00:03:39,150 ‫around whether or not the cache is being used correctly, 100 00:03:39,150 --> 00:03:43,080 ‫so cache hits, cache misses, for items and queries, 101 00:03:43,080 --> 00:03:45,380 ‫CPU utilization, and so on. 102 00:03:45,380 --> 00:03:46,840 ‫So this is very, very handy 103 00:03:46,840 --> 00:03:48,840 ‫to see if DAX is effective for you. 104 00:03:48,840 --> 00:03:51,500 ‫Events, to monitor the events of your database, 105 00:03:51,500 --> 00:03:54,010 ‫as well as settings if you wanted to modify some settings 106 00:03:54,010 --> 00:03:56,190 ‫such as a parameter group, network configuration, 107 00:03:56,190 --> 00:03:59,530 ‫security configuration, maintenance window, and tags, okay? 108 00:03:59,530 --> 00:04:00,740 ‫So that's it for DAX. 109 00:04:00,740 --> 00:04:01,573 ‫I hope you liked it. 110 00:04:01,573 --> 00:04:03,760 ‫Now I'm just going to delete this cluster 111 00:04:03,760 --> 00:04:05,980 ‫including all the CloudWatch alarms, 112 00:04:05,980 --> 00:04:08,063 ‫and I will see you in the next lecture.