1 00:00:00,330 --> 00:00:01,200 ‫So let's go ahead 2 00:00:01,200 --> 00:00:04,410 ‫and create our first database in RDS. 3 00:00:04,410 --> 00:00:06,620 ‫And we're not going to go over all the options, 4 00:00:06,620 --> 00:00:08,820 ‫but we're going to see the general idea 5 00:00:08,820 --> 00:00:11,310 ‫of RDS and how it works. 6 00:00:11,310 --> 00:00:14,080 ‫So, on the left hand side, I will go under Databases 7 00:00:14,080 --> 00:00:16,280 ‫and I will create a database. 8 00:00:16,280 --> 00:00:19,670 ‫So here, we have the interface. 9 00:00:19,670 --> 00:00:23,360 ‫And so we have a standard create and an easy create. 10 00:00:23,360 --> 00:00:25,200 ‫So an easy create is to use recommended 11 00:00:25,200 --> 00:00:27,690 ‫best-practice configurations, 12 00:00:27,690 --> 00:00:29,140 ‫whereas the standard create allows you 13 00:00:29,140 --> 00:00:31,070 ‫to just customize everything. 14 00:00:31,070 --> 00:00:33,270 ‫So, for the purpose of this demonstration, 15 00:00:33,270 --> 00:00:35,320 ‫I will use a standard create. 16 00:00:35,320 --> 00:00:36,920 ‫So we have different options of the engine. 17 00:00:36,920 --> 00:00:39,430 ‫We have Aurora, MySQL, MariaDB, 18 00:00:39,430 --> 00:00:43,040 ‫PostgreSQL, Oracle, and Microsoft SQL Server. 19 00:00:43,040 --> 00:00:44,880 ‫So, in this demo, we're going to launch 20 00:00:44,880 --> 00:00:49,250 ‫a very simple managed MySQL database using RDS, 21 00:00:49,250 --> 00:00:50,350 ‫but we can see that there is a lot 22 00:00:50,350 --> 00:00:52,020 ‫of options available to us. 23 00:00:52,020 --> 00:00:54,510 ‫We'll use the MySQL Community, 24 00:00:54,510 --> 00:00:57,440 ‫and then we'll use the latest version that is recommended, 25 00:00:57,440 --> 00:01:00,090 ‫8.0.23, but it really doesn't matter. 26 00:01:00,090 --> 00:01:01,480 ‫Here, we have some templates 27 00:01:01,480 --> 00:01:04,830 ‫to launch our MySQL RDS database. 28 00:01:04,830 --> 00:01:06,400 ‫We have the Production template, 29 00:01:06,400 --> 00:01:09,510 ‫the Dev/Test template, or the Free Tier template, 30 00:01:09,510 --> 00:01:11,320 ‫which is quite nice because it pre-fills 31 00:01:11,320 --> 00:01:13,490 ‫some of the settings from below. 32 00:01:13,490 --> 00:01:14,870 ‫And we'll see what I mean. 33 00:01:14,870 --> 00:01:17,240 ‫So if we go into the free tier, 34 00:01:17,240 --> 00:01:18,660 ‫because we wanna stay within the free tier. 35 00:01:18,660 --> 00:01:19,770 ‫Let's scroll down. 36 00:01:19,770 --> 00:01:22,790 ‫For the DB identifier, I will use database-1. This is fine. 37 00:01:22,790 --> 00:01:27,590 ‫Here, there is a master username. So admin is great. 38 00:01:27,590 --> 00:01:31,743 ‫And then, the password, I will enter password twice. 39 00:01:32,800 --> 00:01:35,120 ‫And then, I will scroll down. 40 00:01:35,120 --> 00:01:39,300 ‫The database class is now a burstable class of T2 micro. 41 00:01:39,300 --> 00:01:42,550 ‫Well, that's the only one I can actually enter here 42 00:01:42,550 --> 00:01:44,650 ‫because I went with the Free Tier setting. 43 00:01:44,650 --> 00:01:47,370 ‫But if I went with, for example, Production setting, 44 00:01:47,370 --> 00:01:49,940 ‫I could be choosing another type of class, 45 00:01:49,940 --> 00:01:52,040 ‫for example, any kind of class in here. 46 00:01:52,040 --> 00:01:54,520 ‫But again, we'll stay within the free tier 47 00:01:54,520 --> 00:01:58,240 ‫and use a T2 micro type of database. 48 00:01:58,240 --> 00:02:01,160 ‫I'll scroll down, we have some settings around storage. 49 00:02:01,160 --> 00:02:05,430 ‫We can enable 20 gigabytes of gp2 SSD storage, 50 00:02:05,430 --> 00:02:07,400 ‫and then we can have storage autoscaling. 51 00:02:07,400 --> 00:02:10,450 ‫In case we are having more storage than 20 gigabytes, 52 00:02:10,450 --> 00:02:12,800 ‫it will automatically increase the storage for us 53 00:02:12,800 --> 00:02:17,190 ‫with a maximum of one terabyte, 1,000 gigabytes in here. 54 00:02:17,190 --> 00:02:18,490 ‫Availability and durability, 55 00:02:18,490 --> 00:02:21,400 ‫for now, we will not go over these settings. 56 00:02:21,400 --> 00:02:23,610 ‫Connectivity, so where do we want to launch the database? 57 00:02:23,610 --> 00:02:26,690 ‫So we specify a virtual private cloud, or a VPC, 58 00:02:26,690 --> 00:02:28,840 ‫as well as a subnet group. 59 00:02:28,840 --> 00:02:31,650 ‫Do we want to have public access to our database? Yes or no? 60 00:02:31,650 --> 00:02:32,840 ‫Well, you need to specify yes 61 00:02:32,840 --> 00:02:34,130 ‫if you want to be able to connect 62 00:02:34,130 --> 00:02:35,860 ‫to your database from your computer 63 00:02:35,860 --> 00:02:38,280 ‫if you don't have direct connectivity into AWS, 64 00:02:38,280 --> 00:02:39,350 ‫which should be the case for you, 65 00:02:39,350 --> 00:02:42,120 ‫so we'll keep it as yes public access. 66 00:02:42,120 --> 00:02:45,270 ‫Then, we should assign some security group. 67 00:02:45,270 --> 00:02:47,549 ‫So you can create a new security group. 68 00:02:47,549 --> 00:02:51,340 ‫I'll call it demo-database-rds. 69 00:02:51,340 --> 00:02:54,630 ‫And the AZ is going to be no preference. This is fine. 70 00:02:54,630 --> 00:02:59,550 ‫And database port is 3306. Excellent. 71 00:02:59,550 --> 00:03:01,740 ‫Now, how do we want to authenticate the database? 72 00:03:01,740 --> 00:03:05,050 ‫Using password or password and IAM or password and Kerberos. 73 00:03:05,050 --> 00:03:05,980 ‫We'll keep it very simple 74 00:03:05,980 --> 00:03:08,720 ‫and use it with password authentication. 75 00:03:08,720 --> 00:03:11,800 ‫And we will not go over any additional configuration for now 76 00:03:11,800 --> 00:03:13,590 ‫because there could be a lot for you. 77 00:03:13,590 --> 00:03:16,560 ‫But so, as we can see here, we have the RDS Free Tier. 78 00:03:16,560 --> 00:03:18,400 ‫It's available for us for 12 months, 79 00:03:18,400 --> 00:03:20,780 ‫and then we'll get 725, 80 00:03:20,780 --> 00:03:24,200 ‫basically, a full month of RDS free every month 81 00:03:24,200 --> 00:03:26,150 ‫for the db.t2.micro instance 82 00:03:26,150 --> 00:03:28,170 ‫as well as 20 gigabytes free of SSD, 83 00:03:28,170 --> 00:03:29,770 ‫so, again, this is what we selected, 84 00:03:29,770 --> 00:03:31,960 ‫and some space for backups. 85 00:03:31,960 --> 00:03:33,883 ‫So we'll create this database. 86 00:03:36,900 --> 00:03:40,680 ‫So it took a few minutes, but now my database is created. 87 00:03:40,680 --> 00:03:42,280 ‫And here, we have some summary. 88 00:03:42,280 --> 00:03:43,810 ‫So we know where it is launched, 89 00:03:43,810 --> 00:03:45,870 ‫for example, eu-central-1a. 90 00:03:45,870 --> 00:03:47,650 ‫We get some information around the endpoint. 91 00:03:47,650 --> 00:03:48,730 ‫If you wanted to connect to it, 92 00:03:48,730 --> 00:03:52,270 ‫this would be the endpoint and the port to be using. 93 00:03:52,270 --> 00:03:54,530 ‫We can have a look at the VPC security group 94 00:03:54,530 --> 00:03:57,540 ‫that has been created for my RDS instance 95 00:03:57,540 --> 00:03:58,373 ‫and the inbound rules. 96 00:03:58,373 --> 00:04:02,372 ‫We can see there's an inbound rule on the port, 97 00:04:02,372 --> 00:04:03,640 ‫and if I scroll right, 98 00:04:03,640 --> 00:04:06,700 ‫on the port 3306 into my instance. 99 00:04:06,700 --> 00:04:09,300 ‫So that means that I can use the correct port 100 00:04:09,300 --> 00:04:11,610 ‫to connect to my MySQL database instance. 101 00:04:11,610 --> 00:04:12,480 ‫Perfect. 102 00:04:12,480 --> 00:04:13,810 ‫If we look into Monitoring, 103 00:04:13,810 --> 00:04:14,930 ‫because this is a managed service, 104 00:04:14,930 --> 00:04:17,810 ‫we have some information around the CPU utilization, 105 00:04:17,810 --> 00:04:18,643 ‫which is great. 106 00:04:18,643 --> 00:04:22,430 ‫So we start really seeing the power of Managed Services, 107 00:04:22,430 --> 00:04:23,550 ‫login events, and so on. 108 00:04:23,550 --> 00:04:24,790 ‫Configuration, Backups, and Tags. 109 00:04:24,790 --> 00:04:27,550 ‫So, as we can see, having a database in the cloud 110 00:04:27,550 --> 00:04:28,790 ‫is really helpful when it's managed 111 00:04:28,790 --> 00:04:31,480 ‫because, well, we have all the nice monitoring, 112 00:04:31,480 --> 00:04:34,890 ‫configuration, settings, and so on, associated with it, 113 00:04:34,890 --> 00:04:36,970 ‫so this is a huge advantage. 114 00:04:36,970 --> 00:04:37,970 ‫Other things you can do 115 00:04:37,970 --> 00:04:40,260 ‫is that you can take a snapshot of your database, 116 00:04:40,260 --> 00:04:42,860 ‫and this snapshot will allow you, for example, 117 00:04:42,860 --> 00:04:45,570 ‫to restore the database into another one. 118 00:04:45,570 --> 00:04:50,570 ‫So let's do it, demo-snapshot, and we'll take the snapshot. 119 00:04:50,930 --> 00:04:53,300 ‫So we can't do it because my database is still 120 00:04:53,300 --> 00:04:57,570 ‫in a backup stage, so what I'm going to do is wait for it 121 00:04:57,570 --> 00:04:59,760 ‫to not be backed up, but to be available. 122 00:04:59,760 --> 00:05:01,700 ‫Okay, so my database is now available. 123 00:05:01,700 --> 00:05:04,860 ‫So let's go back to Actions, Take Snapshot, 124 00:05:04,860 --> 00:05:06,290 ‫and here's my snapshot name. 125 00:05:06,290 --> 00:05:07,770 ‫Take the snapshot. 126 00:05:07,770 --> 00:05:10,010 ‫Now, my snapshot is being created. 127 00:05:10,010 --> 00:05:11,850 ‫And with it, I have a few options. 128 00:05:11,850 --> 00:05:15,070 ‫So I can click on it and I can do a few things. 129 00:05:15,070 --> 00:05:16,240 ‫So let's wait for it to be created. 130 00:05:16,240 --> 00:05:19,001 ‫Right now, it's in the Creating status. 131 00:05:19,001 --> 00:05:21,759 ‫So my snapshot is now available, 132 00:05:21,759 --> 00:05:24,747 ‫and what I can do is do Action, Restore Snapshot, 133 00:05:24,747 --> 00:05:27,570 ‫and this would allow me to create a new database 134 00:05:27,570 --> 00:05:29,447 ‫out of this snapshot. 135 00:05:29,447 --> 00:05:32,450 ‫And the reason why I would do so is that, for example, 136 00:05:32,450 --> 00:05:34,830 ‫you wanted to create a bigger database 137 00:05:34,830 --> 00:05:36,940 ‫or create a copy of the database and so on, 138 00:05:36,940 --> 00:05:39,310 ‫or create a different settings for your database. 139 00:05:39,310 --> 00:05:42,500 ‫Then, restoring a snapshot would be the way to do it. 140 00:05:42,500 --> 00:05:44,040 ‫So I'm going to cancel this. 141 00:05:44,040 --> 00:05:47,560 ‫Other things you can do with your snapshot is to copy it. 142 00:05:47,560 --> 00:05:49,300 ‫So you can copy it to a different region. 143 00:05:49,300 --> 00:05:50,730 ‫And this would be extremely helpful 144 00:05:50,730 --> 00:05:52,340 ‫if you wanted to restore the database 145 00:05:52,340 --> 00:05:53,740 ‫into another region of AWS, 146 00:05:53,740 --> 00:05:56,030 ‫for example, for disaster recovery. 147 00:05:56,030 --> 00:05:58,370 ‫So yet another very handy feature. 148 00:05:58,370 --> 00:06:01,330 ‫Another thing you can do is share the snapshot. 149 00:06:01,330 --> 00:06:03,100 ‫And sharing the snapshot allows you 150 00:06:03,100 --> 00:06:04,500 ‫to share with other accounts 151 00:06:04,500 --> 00:06:06,400 ‫so they can restore their database 152 00:06:06,400 --> 00:06:07,990 ‫directly from your snapshot. 153 00:06:07,990 --> 00:06:10,290 ‫So again, another very handy feature. 154 00:06:10,290 --> 00:06:12,880 ‫So that's it for RDS, just as a quick overview. 155 00:06:12,880 --> 00:06:14,780 ‫So again, we've created a database, 156 00:06:14,780 --> 00:06:16,380 ‫and we've created a snapshot out of it, 157 00:06:16,380 --> 00:06:17,770 ‫and we saw different options. 158 00:06:17,770 --> 00:06:21,980 ‫So you can see, Managed Services really have a good impact 159 00:06:21,980 --> 00:06:23,650 ‫on how you use the cloud, 160 00:06:23,650 --> 00:06:25,440 ‫and they really speed it up for you 161 00:06:25,440 --> 00:06:28,050 ‫to make sure that you don't manage too much infrastructure. 162 00:06:28,050 --> 00:06:29,320 ‫So just to finish this hands-on, 163 00:06:29,320 --> 00:06:31,840 ‫let's delete this snapshot, 164 00:06:31,840 --> 00:06:34,470 ‫and then we're also going to delete this database 165 00:06:34,470 --> 00:06:36,350 ‫by doing Action, Delete, 166 00:06:36,350 --> 00:06:39,060 ‫and then you don't want to create a final snapshot, 167 00:06:39,060 --> 00:06:41,380 ‫you do not want to retain automated backups, 168 00:06:41,380 --> 00:06:44,710 ‫and you acknowledge that everything will be deleted, 169 00:06:44,710 --> 00:06:47,490 ‫then you type delete me, and you're good to go. 170 00:06:47,490 --> 00:06:48,530 ‫So that's it for this lecture. 171 00:06:48,530 --> 00:06:49,510 ‫I hope you liked it, 172 00:06:49,510 --> 00:06:51,460 ‫and I will see you in the next lecture.