1 00:00:00,240 --> 00:00:01,370 Okay, so let's go ahead 2 00:00:01,370 --> 00:00:04,830 and practice using the ElastiCache service 3 00:00:04,830 --> 00:00:07,480 by creating our first Redis database. 4 00:00:07,480 --> 00:00:09,060 So let's get started, 5 00:00:09,060 --> 00:00:11,920 and in this we have the option to create a cluster. 6 00:00:11,920 --> 00:00:15,370 It can be either a Redis or a Memcached cluster. 7 00:00:15,370 --> 00:00:16,950 And I click on Create cluster. 8 00:00:16,950 --> 00:00:18,630 We'll just go ahead with the Redis cluster setup. 9 00:00:18,630 --> 00:00:21,630 You can have fun and look at the options for Memcached. 10 00:00:21,630 --> 00:00:24,970 So this is the cluster creation UI, 11 00:00:24,970 --> 00:00:27,100 and we're going to Configure and create a new cluster, 12 00:00:27,100 --> 00:00:28,390 but we could Restore from backups 13 00:00:28,390 --> 00:00:30,770 if we had created backups from before. 14 00:00:30,770 --> 00:00:34,130 Now we have the chance to either enable the cluster mode, 15 00:00:34,130 --> 00:00:36,860 and this is to have multiple replications happening, 16 00:00:36,860 --> 00:00:39,760 and it's going to enhance scalability and availability, 17 00:00:39,760 --> 00:00:41,290 or to disable it. 18 00:00:41,290 --> 00:00:43,520 And you'll have a single shard, a single node group. 19 00:00:43,520 --> 00:00:46,070 And you have maximum one primary node 20 00:00:46,070 --> 00:00:48,280 and up to five read replicas. 21 00:00:48,280 --> 00:00:50,530 To keep it simple and to keep it free, 22 00:00:50,530 --> 00:00:52,710 we'll disable the cluster mode. 23 00:00:52,710 --> 00:00:56,483 Next, Cluster info, so demo-redis. 24 00:00:58,100 --> 00:00:59,150 Then the location, 25 00:00:59,150 --> 00:01:01,510 so whether or not we want this ElastiCache service 26 00:01:01,510 --> 00:01:05,030 to be on the Cloud or on your premises, 27 00:01:05,030 --> 00:01:07,690 thanks to the service called AWS Outposts, 28 00:01:07,690 --> 00:01:09,200 we'll keep it simple, 29 00:01:09,200 --> 00:01:10,850 because we don't have On premises anyway, 30 00:01:10,850 --> 00:01:12,010 we'll use the Cloud. 31 00:01:12,010 --> 00:01:13,740 Whether or not we want to be Multi-AZ, 32 00:01:13,740 --> 00:01:16,320 so Multi-AZ will provide you enhanced high availability 33 00:01:16,320 --> 00:01:19,580 through automatic failover to a read replica, a cross AZ, 34 00:01:19,580 --> 00:01:21,690 or in case of a primary node failover, 35 00:01:21,690 --> 00:01:23,520 that will disable it, okay? 36 00:01:23,520 --> 00:01:24,910 And the reason I do so is that 37 00:01:24,910 --> 00:01:26,930 because we would pay more otherwise, 38 00:01:26,930 --> 00:01:28,350 and we're just going through the demo 39 00:01:28,350 --> 00:01:31,150 of creating an ElastiCache cluster anyway. 40 00:01:31,150 --> 00:01:34,430 And this Auto-failover enables you to get high availability 41 00:01:34,430 --> 00:01:36,630 by failing automatically to a read replica 42 00:01:36,630 --> 00:01:38,800 in case of a primary node failover. 43 00:01:38,800 --> 00:01:40,760 I can keep it as is for now. 44 00:01:40,760 --> 00:01:41,593 The Cluster settings, 45 00:01:41,593 --> 00:01:43,350 so we specify the Engine version. 46 00:01:43,350 --> 00:01:44,900 The Port, we'll leave everything as default. 47 00:01:44,900 --> 00:01:47,150 The Parameter groups as well as the Node type, 48 00:01:47,150 --> 00:01:51,670 so this time the Node type is way too high for our needs, 49 00:01:51,670 --> 00:01:54,850 so we can use a micro type of cache, okay? 50 00:01:54,850 --> 00:01:56,290 And I'll use a t2.micro, 51 00:01:56,290 --> 00:01:57,280 because I know it's enough right here, 52 00:01:57,280 --> 00:01:59,730 but I guess the other ones may be as well. 53 00:01:59,730 --> 00:02:02,330 Number of replicas is between zero and five. 54 00:02:02,330 --> 00:02:04,600 So what's happening is that if you have two replicas, 55 00:02:04,600 --> 00:02:05,650 then, of course, you're gonna be 56 00:02:05,650 --> 00:02:09,039 in a Multi-AZ kind of settings, okay? 57 00:02:09,039 --> 00:02:11,220 But if you set up zero with replicas, 58 00:02:11,220 --> 00:02:13,470 then Multi-AZ cannot be enabled, 59 00:02:13,470 --> 00:02:16,340 and so you have these options completely disabled, 60 00:02:16,340 --> 00:02:17,710 and that makes sense, right? 61 00:02:17,710 --> 00:02:19,390 So we wanna be again with a node right here, 62 00:02:19,390 --> 00:02:21,020 so I will not have any replicas 63 00:02:21,020 --> 00:02:23,363 so we'll leave the number as zero. 64 00:02:24,540 --> 00:02:26,720 Next we need to create a subnet group, 65 00:02:26,720 --> 00:02:29,830 which is a collection of subnets, okay? 66 00:02:29,830 --> 00:02:33,150 So I'll call this one my-first-subnet-group. 67 00:02:33,150 --> 00:02:36,080 And this will tell the ElastiCache service 68 00:02:36,080 --> 00:02:38,960 to run the nodes within the subnet group. 69 00:02:38,960 --> 00:02:41,540 So we'll choose our main VPC, default VPC, 70 00:02:41,540 --> 00:02:44,010 and we already have three subnets created 71 00:02:44,010 --> 00:02:46,390 and selected by default. 72 00:02:46,390 --> 00:02:48,150 And then click on Next. 73 00:02:48,150 --> 00:02:50,300 We can enable Encryption at rest using a key 74 00:02:50,300 --> 00:02:51,330 if you wanted to, 75 00:02:51,330 --> 00:02:54,140 as well as Encryption in transit if we wanted to. 76 00:02:54,140 --> 00:02:56,510 And then if we do enable Encryption in transit, 77 00:02:56,510 --> 00:02:58,990 then we can get some Access control, 78 00:02:58,990 --> 00:03:02,630 so we can specify use Redis AUTH for user access 79 00:03:02,630 --> 00:03:05,940 in which you would specify a token in here. 80 00:03:05,940 --> 00:03:09,720 And that token could be used to connect to the cluster. 81 00:03:09,720 --> 00:03:10,820 But I will disable it. 82 00:03:12,830 --> 00:03:14,570 And next we can go into Backup, 83 00:03:14,570 --> 00:03:16,780 so you want to Enable automatic backups or not 84 00:03:16,780 --> 00:03:17,613 on your database. 85 00:03:17,613 --> 00:03:18,880 I will disable it. 86 00:03:18,880 --> 00:03:21,180 Maintenance windows, to perform the upgrades 87 00:03:21,180 --> 00:03:23,160 as well as the backups. 88 00:03:23,160 --> 00:03:25,340 Logs, Tags, so it is very similar to RDS, 89 00:03:25,340 --> 00:03:26,330 you will notice. 90 00:03:26,330 --> 00:03:27,340 So everything is created, 91 00:03:27,340 --> 00:03:31,660 let's go ahead and create our ElastiCache node, 92 00:03:31,660 --> 00:03:32,780 and there's only one, 93 00:03:32,780 --> 00:03:35,193 so it's a cluster of one node right now. 94 00:03:36,270 --> 00:03:39,750 My ElastiCache database is now created, 95 00:03:39,750 --> 00:03:40,820 and I can click on it, 96 00:03:40,820 --> 00:03:43,070 and if I had an application that I wrote 97 00:03:43,070 --> 00:03:44,120 with some code, 98 00:03:44,120 --> 00:03:46,510 I could actually use the Primary endpoints, 99 00:03:46,510 --> 00:03:48,699 or if it was a read replica, a Reader endpoint 100 00:03:48,699 --> 00:03:51,800 to allow to read from my cache, okay? 101 00:03:51,800 --> 00:03:54,350 Now, there is no easy way for me to show you 102 00:03:54,350 --> 00:03:57,240 how to connect to a Redis cache, 103 00:03:57,240 --> 00:03:58,530 because it's not that easy 104 00:03:58,530 --> 00:04:00,340 and you need to actually write some code. 105 00:04:00,340 --> 00:04:01,950 And that would be too complicated. 106 00:04:01,950 --> 00:04:03,730 But from an AWS perspective, 107 00:04:03,730 --> 00:04:06,600 from this console, you can see all the details 108 00:04:06,600 --> 00:04:09,730 as well as Nodes, Metrics, Logs, Network Security, 109 00:04:09,730 --> 00:04:10,630 and so on. 110 00:04:10,630 --> 00:04:12,410 And it looks just like RDS, 111 00:04:12,410 --> 00:04:15,140 because, yes, it is very similar service to RDS, 112 00:04:15,140 --> 00:04:19,010 but it's intended for Redis and Memcached. 113 00:04:19,010 --> 00:04:20,410 So the last thing you have to do 114 00:04:20,410 --> 00:04:24,130 is take this Redis cluster, Action, and then Delete. 115 00:04:24,130 --> 00:04:25,220 And then, do you wanna backup? 116 00:04:25,220 --> 00:04:29,100 No, you just type the name of the cluster, Delete. 117 00:04:29,100 --> 00:04:30,840 And you're done with this hands-on. 118 00:04:30,840 --> 00:04:31,673 Okay, that's it. 119 00:04:31,673 --> 00:04:32,550 I hope you liked it, 120 00:04:32,550 --> 00:04:34,513 and I will see you in the next lecture.