1 00:00:00,070 --> 00:00:01,320 Okay, so let's have a play 2 00:00:01,320 --> 00:00:03,295 with AWS global accelerator. 3 00:00:03,295 --> 00:00:05,770 And by the way, this hands on is not free. 4 00:00:05,770 --> 00:00:08,144 So if you don't want to spend any money for this course, 5 00:00:08,144 --> 00:00:09,840 then please don't use the service. 6 00:00:09,840 --> 00:00:12,260 Otherwise, if you're really willing to spend a few cents, 7 00:00:12,260 --> 00:00:13,230 then you can go ahead with me 8 00:00:13,230 --> 00:00:16,210 and create this hands on global accelerator. 9 00:00:16,210 --> 00:00:17,407 And for this no matter what the region 10 00:00:17,407 --> 00:00:19,680 you're going to be in, so let's go to Frankfurt, 11 00:00:19,680 --> 00:00:20,770 for example. 12 00:00:20,770 --> 00:00:24,682 And if I try to log into AWS global accelerator, 13 00:00:24,682 --> 00:00:28,020 as you can see, I will be taken 14 00:00:28,020 --> 00:00:30,928 automatically to US west to Oregon, 15 00:00:30,928 --> 00:00:33,120 it's because no matter what region you choose, 16 00:00:33,120 --> 00:00:34,760 the global accelerator is global, 17 00:00:34,760 --> 00:00:37,990 and therefore it goes into the same configuration region. 18 00:00:37,990 --> 00:00:39,870 But before we can create a global accelerator, 19 00:00:39,870 --> 00:00:41,471 we have to create our application. 20 00:00:41,471 --> 00:00:44,370 So let's go to the EC to service. 21 00:00:44,370 --> 00:00:46,130 And I'm going to choose my first region 22 00:00:46,130 --> 00:00:48,698 for EC to maybe US East one. 23 00:00:48,698 --> 00:00:50,798 So I'm going to use this one and I'm going 24 00:00:51,829 --> 00:00:53,080 to create an easy to instance in that region. 25 00:00:53,080 --> 00:00:55,220 There is going to expose an HTTP service. 26 00:00:55,220 --> 00:00:56,300 So we've know how to do this. 27 00:00:56,300 --> 00:00:57,610 Let's so let's try again together. 28 00:00:57,610 --> 00:01:00,199 We create instance, Amazon Unix 2 AMI, 29 00:01:00,199 --> 00:01:01,990 and then I will choose to 30 00:01:01,990 --> 00:01:04,197 micro configure the instance details. 31 00:01:04,197 --> 00:01:05,700 I will want one instance. 32 00:01:05,700 --> 00:01:08,570 And I will scroll down and I will not some user data. 33 00:01:08,570 --> 00:01:11,370 So the user data I'm going to use the same as before. 34 00:01:11,370 --> 00:01:14,120 But this time, I'm going to also add something 35 00:01:14,120 --> 00:01:18,880 so Halliwell from host name in US East one. 36 00:01:18,880 --> 00:01:20,870 So just a little bit of text before 37 00:01:20,870 --> 00:01:23,380 the brackets just so that we get some more 38 00:01:23,380 --> 00:01:26,130 information in the index HTML file. 39 00:01:26,130 --> 00:01:27,047 So we know which we are in. 40 00:01:27,047 --> 00:01:29,281 And so US East one, perfect. 41 00:01:29,281 --> 00:01:31,000 Click on that storage, 42 00:01:31,000 --> 00:01:34,150 click on next Etags security groups and we are going 43 00:01:34,150 --> 00:01:35,950 to create a new security group 44 00:01:35,950 --> 00:01:39,590 and it's going to be for HTTP from anywhere. 45 00:01:39,590 --> 00:01:41,776 So custom 0000 This is perfect. 46 00:01:41,776 --> 00:01:46,290 And the name will be global accelerator Demo. 47 00:01:48,750 --> 00:01:50,270 Okay, review your launch, 48 00:01:50,270 --> 00:01:51,430 launch or instance. 49 00:01:51,430 --> 00:01:53,560 And then you choose a key pair or you don't even need to 50 00:01:53,560 --> 00:01:55,310 choose a key part because we won't 51 00:01:55,310 --> 00:01:56,143 even login into our instance. 52 00:01:56,143 --> 00:01:58,690 So we can proceed without a key pair and say yes, 53 00:01:58,690 --> 00:01:59,810 I acknowledge it will not be able 54 00:01:59,810 --> 00:02:01,100 to connect to my instance, 55 00:02:01,100 --> 00:02:02,073 to SSH into it, but this is fine, 56 00:02:02,073 --> 00:02:05,550 because we don't want to SSH into our instance anyway. 57 00:02:05,550 --> 00:02:06,778 So this is our first instance, 58 00:02:06,778 --> 00:02:08,690 that is in US East one, eight. 59 00:02:08,690 --> 00:02:11,220 And well, it's launching and going to go to another region, 60 00:02:11,220 --> 00:02:12,780 for example, Mumbai. 61 00:02:12,780 --> 00:02:16,936 So Asia Pacific AP South one and I open this in a new tab. 62 00:02:16,936 --> 00:02:19,930 And we have to repeat the entire same process. 63 00:02:19,930 --> 00:02:23,938 So I'm going to go to instances, launching an instance. 64 00:02:23,938 --> 00:02:27,500 And then I'm going to choose a T 2 micro. 65 00:02:27,500 --> 00:02:29,813 So Amazon likes to teach you micro 66 00:02:29,813 --> 00:02:32,070 and we have to reconfigure it. 67 00:02:32,070 --> 00:02:33,570 So I'm going to copy and paste 68 00:02:33,570 --> 00:02:38,080 a simulated ever this one I'll say from AP South one, 69 00:02:38,080 --> 00:02:40,440 just we have more information into user data. 70 00:02:40,440 --> 00:02:43,200 Click on that storage at tags security group 71 00:02:43,200 --> 00:02:45,000 and we have to reconfigure a security group 72 00:02:45,000 --> 00:02:47,690 because security groups are scoped by region. 73 00:02:47,690 --> 00:02:51,980 So I call it global accelerator demo. 74 00:02:51,980 --> 00:02:54,310 And again, we have HTTP allowed 75 00:02:54,310 --> 00:02:56,036 from anywhere with your launch, 76 00:02:56,036 --> 00:02:58,190 launch and there's no keeper found. 77 00:02:58,190 --> 00:03:00,010 This is great. I will choose to 78 00:03:00,010 --> 00:03:02,180 proceeded without a keeper and say yes. 79 00:03:02,180 --> 00:03:05,019 I cannot SSH into my instance, so this is fine. 80 00:03:05,019 --> 00:03:07,777 We can view the instances now and it is starting as well. 81 00:03:07,777 --> 00:03:10,030 So let's go back to US. 82 00:03:10,030 --> 00:03:11,660 This one, this one is running. 83 00:03:11,660 --> 00:03:15,041 And if I take the public DNS ipv4 or the public IP, 84 00:03:15,041 --> 00:03:17,048 and open this to a new tab, hopefully, 85 00:03:17,048 --> 00:03:18,870 I should start seeing something so 86 00:03:18,870 --> 00:03:20,370 maybe hasn't launched yet. 87 00:03:20,370 --> 00:03:21,740 So let me wait a little bit of time 88 00:03:21,740 --> 00:03:23,700 to see if it's launches in. 89 00:03:23,700 --> 00:03:24,550 This took a little bit of time, 90 00:03:24,550 --> 00:03:28,110 but we have our lol from IP in US East one. 91 00:03:28,110 --> 00:03:30,600 So if you do the same for our instance in Mumbai. 92 00:03:30,600 --> 00:03:32,915 So we take the public DNS for here, 93 00:03:32,915 --> 00:03:35,515 open this new tab, go there and it will 94 00:03:35,515 --> 00:03:37,372 take a little bit of time to launch. 95 00:03:37,372 --> 00:03:38,890 And and now it's working. 96 00:03:38,890 --> 00:03:42,160 We are getting the Hello World from AP, South One. 97 00:03:42,160 --> 00:03:43,746 So excellent we have our two instances, 98 00:03:43,746 --> 00:03:47,770 one in US East one and one in AP South one already to use. 99 00:03:47,770 --> 00:03:50,400 So back into our management console. 100 00:03:50,400 --> 00:03:52,340 We're using the global accelerator 101 00:03:52,340 --> 00:03:54,253 and we are going to create our first accelerator. 102 00:03:54,253 --> 00:03:56,850 So it's saying okay, we need to have 103 00:03:56,850 --> 00:03:58,137 some basic configuration I'll call it 104 00:03:58,137 --> 00:04:00,273 "my first accelerator" 105 00:04:00,273 --> 00:04:02,655 And then click on Next. 106 00:04:02,655 --> 00:04:04,470 Then we have to set up a listener, 107 00:04:04,470 --> 00:04:06,000 which is what is the ports 108 00:04:06,000 --> 00:04:08,450 and there's going to be listening and that protocol. 109 00:04:08,450 --> 00:04:11,300 So I'll choose port 80 protocol TCP 110 00:04:11,300 --> 00:04:14,290 because we have HTTP traffic, which is built on top of TCP. 111 00:04:14,290 --> 00:04:16,903 And then client affinity is if you want to have 112 00:04:16,903 --> 00:04:18,498 this less sort of a stickiness 113 00:04:18,498 --> 00:04:20,180 to your global bouncer. 114 00:04:20,180 --> 00:04:21,459 For example, if you want the same user 115 00:04:21,459 --> 00:04:23,700 to go back to the same endpoint, and we 116 00:04:23,700 --> 00:04:25,040 can choose by source IP, but for now, 117 00:04:25,040 --> 00:04:26,410 we'll click on that. 118 00:04:26,410 --> 00:04:27,540 Okay, and this is the only listener 119 00:04:27,540 --> 00:04:29,250 we need that we could have multiple ones 120 00:04:29,250 --> 00:04:31,078 if we wanted to click on Next. 121 00:04:31,078 --> 00:04:33,583 And then we talk about endpoint groups. 122 00:04:33,583 --> 00:04:35,705 So this is how to group endpoints by region. 123 00:04:35,705 --> 00:04:39,120 And the first region we have is US East one A 124 00:04:39,120 --> 00:04:40,840 sorry US East one, 125 00:04:40,840 --> 00:04:42,530 and that's the one where I created this instance. 126 00:04:42,530 --> 00:04:44,043 So I'll say okay, 127 00:04:44,043 --> 00:04:45,930 and the traffic gel is 100. 128 00:04:45,930 --> 00:04:48,216 So that means that's its value as a weight, 129 00:04:48,216 --> 00:04:51,428 but 100% of the traffic will go to that region. 130 00:04:51,428 --> 00:04:53,190 And for the health check for that region, 131 00:04:53,190 --> 00:04:55,000 because we're using an easy 132 00:04:55,000 --> 00:04:56,800 to instance it uses health check here. 133 00:04:56,800 --> 00:04:59,770 So it's going to go on port 80 protocol TCP, 134 00:04:59,770 --> 00:05:00,603 this is Perfect. 135 00:05:00,603 --> 00:05:02,141 we can have HTTP as well. 136 00:05:02,141 --> 00:05:05,210 HTTP slash, the check interval, 137 00:05:05,210 --> 00:05:06,270 maybe every 10 seconds 138 00:05:06,270 --> 00:05:08,260 and the threshold counts 3. 139 00:05:08,260 --> 00:05:09,700 So this is perfect for this health check. 140 00:05:09,700 --> 00:05:13,010 And Alternatively, if we are having endpoints, 141 00:05:13,010 --> 00:05:15,020 that would be not easy two instances. 142 00:05:15,020 --> 00:05:16,765 But they would be load balancer, for example, 143 00:05:16,765 --> 00:05:17,598 an ALB. 144 00:05:17,598 --> 00:05:20,010 Then it would look to medically leverage 145 00:05:20,010 --> 00:05:22,291 the health check of that ALB, So this is perfect. 146 00:05:22,291 --> 00:05:25,569 Okay, so next, we add another endpoint group. 147 00:05:25,569 --> 00:05:27,880 And this one is going to be from Mumbai. 148 00:05:27,880 --> 00:05:31,880 So AP South one, And we have also a traffic dial of 100. 149 00:05:31,880 --> 00:05:33,087 And again, will configure the health check 150 00:05:33,087 --> 00:05:38,087 to be HTTP on slash for the interval 30. 151 00:05:38,820 --> 00:05:40,380 And the threshold counts of 3. 152 00:05:40,380 --> 00:05:42,080 Click on Next. 153 00:05:42,080 --> 00:05:43,787 And now we have two endpoint groups, 154 00:05:43,787 --> 00:05:46,443 USD one and AP South one and we can add endpoints. 155 00:05:46,443 --> 00:05:49,490 The endpoints can be an application load balancer, 156 00:05:49,490 --> 00:05:51,360 and network load balancer and easy to instance 157 00:05:51,360 --> 00:05:52,555 or an elastic IP address. 158 00:05:52,555 --> 00:05:54,870 But for now, we only have easy two instances. 159 00:05:54,870 --> 00:05:56,170 So we'll click on easy to instance, 160 00:05:56,170 --> 00:05:58,189 will choose the instance ID that we have 161 00:05:58,189 --> 00:06:00,414 and we can assign a weight against. 162 00:06:00,414 --> 00:06:03,750 Okay, next, we can go to AP South one 163 00:06:03,750 --> 00:06:04,912 and do the exact same thing at an easy to instance, 164 00:06:04,912 --> 00:06:09,340 and choose HTTP instance to be this one. 165 00:06:09,340 --> 00:06:12,610 And same with some white, we click on Create accelerator, 166 00:06:12,610 --> 00:06:15,543 and voila, our first accelerator is being created. 167 00:06:16,490 --> 00:06:18,400 So my accelerator is now created. 168 00:06:18,400 --> 00:06:19,730 And the first thing we see is that 169 00:06:19,730 --> 00:06:22,800 we have two static IP addresses these two, 170 00:06:22,800 --> 00:06:23,750 and they're going to be my 171 00:06:23,750 --> 00:06:27,600 global any cast IP addresses to access my application. 172 00:06:27,600 --> 00:06:30,144 We also have an associated DNS name with it. 173 00:06:30,144 --> 00:06:32,610 And now our status is deployed. 174 00:06:32,610 --> 00:06:35,930 So if you go back to my accelerator, and we look at it, 175 00:06:35,930 --> 00:06:37,694 we can see that we have one listener. 176 00:06:37,694 --> 00:06:39,707 And then if I go to the listener, 177 00:06:39,707 --> 00:06:42,130 we have two endpoint groups. 178 00:06:42,130 --> 00:06:43,593 We have this first end point group right here, 179 00:06:43,593 --> 00:06:45,950 and the health checks are still happening. 180 00:06:45,950 --> 00:06:47,710 And right now it says unhealthy. 181 00:06:47,710 --> 00:06:49,410 So it says a health status might take a few minutes 182 00:06:49,410 --> 00:06:51,350 to update with the correct status. 183 00:06:51,350 --> 00:06:54,216 So let's wait a little bit to see if that fixes itself. 184 00:06:54,216 --> 00:06:55,940 So this took a little bit of time, 185 00:06:55,940 --> 00:06:57,630 but now my instance is showing up 186 00:06:57,630 --> 00:07:00,065 as healthy for this one listener. 187 00:07:00,065 --> 00:07:03,310 For the other end point group in AP South one 188 00:07:03,310 --> 00:07:04,870 is going to show as healthy again. 189 00:07:04,870 --> 00:07:06,040 So this is perfect. 190 00:07:06,040 --> 00:07:09,000 So our accelerator is ready, it's healthy. 191 00:07:09,000 --> 00:07:10,635 And now we can go ahead and test it. 192 00:07:10,635 --> 00:07:13,939 So I'm testing it from Europe, and I go to this URL, 193 00:07:13,939 --> 00:07:17,040 and I am redirected to US East one. 194 00:07:17,040 --> 00:07:18,610 That's because US East one is going to be 195 00:07:18,610 --> 00:07:21,000 for me the closest and fastest region. 196 00:07:21,000 --> 00:07:24,090 So if I keep on refreshing, I keep on going to US East one. 197 00:07:24,090 --> 00:07:26,440 And so I can test if this 198 00:07:26,440 --> 00:07:28,035 is working for a global application, 199 00:07:28,035 --> 00:07:30,940 because I want to be able to go to the Mumbai region. 200 00:07:30,940 --> 00:07:33,180 For example, So say I'm going to change 201 00:07:33,180 --> 00:07:34,930 my location and have a VPN. 202 00:07:34,930 --> 00:07:36,510 And I'm going to connect to a country 203 00:07:36,510 --> 00:07:39,200 and when they connect to Indonesia, so Indonesia 204 00:07:39,200 --> 00:07:43,005 is going to be closer to India, then America. 205 00:07:43,005 --> 00:07:45,881 So let's wait a second, I'm going to connect to Indonesia. 206 00:07:45,881 --> 00:07:48,400 And I am connected to Indonesia. 207 00:07:48,400 --> 00:07:50,800 And I'm going to try again to refresh this page. 208 00:07:52,640 --> 00:07:54,249 And now I get a response from a piece of one 209 00:07:54,249 --> 00:07:56,700 so this is completely working. 210 00:07:56,700 --> 00:07:59,660 So if I refresh again, I connected to AP South one. 211 00:07:59,660 --> 00:08:00,780 This is a excellent. 212 00:08:00,780 --> 00:08:02,720 But now we can also test your health checks. 213 00:08:02,720 --> 00:08:07,315 So if I go to my region in AP South one, 214 00:08:07,315 --> 00:08:09,740 and I'm going to change the security group 215 00:08:09,740 --> 00:08:11,610 to make the health checks fail. 216 00:08:11,610 --> 00:08:13,310 So I'm going to go to my security group 217 00:08:13,310 --> 00:08:15,407 view the inbound rules, click on it. 218 00:08:15,407 --> 00:08:18,270 And I'm just going to simply remove 219 00:08:18,270 --> 00:08:19,600 this security group rule. 220 00:08:19,600 --> 00:08:21,440 So that the health check will fail. 221 00:08:21,440 --> 00:08:24,883 So I will edit, remove it, click on save. 222 00:08:24,883 --> 00:08:27,210 Okay, here we go. 223 00:08:27,210 --> 00:08:29,299 So now what I should be expecting is that at some points, 224 00:08:29,299 --> 00:08:31,693 my first accelerator should very very quickly 225 00:08:31,693 --> 00:08:35,750 realize that our instance is unhealthy. 226 00:08:35,750 --> 00:08:37,360 So let's go to our listener ID. 227 00:08:37,360 --> 00:08:40,986 And then I'm going to go to my endpoint in AP South one. 228 00:08:40,986 --> 00:08:42,873 And so what we hope to see is that 229 00:08:42,873 --> 00:08:44,931 this issue right now showing up as healthy. 230 00:08:44,931 --> 00:08:47,000 But soon enough, within a minute, 231 00:08:47,000 --> 00:08:48,426 it should show up as unhealthy. 232 00:08:48,426 --> 00:08:51,070 And if it does so and I a refresh this page, 233 00:08:51,070 --> 00:08:52,910 then it's going to show me US East one 234 00:08:52,910 --> 00:08:54,720 instead of AP South one. 235 00:08:54,720 --> 00:08:56,297 So let's wait a little bit of time 236 00:08:56,297 --> 00:08:59,370 in this UI to see what happens. 237 00:08:59,370 --> 00:09:01,860 Okay, so our instance is now unhealthy. 238 00:09:01,860 --> 00:09:03,100 And so if I go back to my 239 00:09:03,100 --> 00:09:05,323 global accelerator DNS name and refresh, 240 00:09:05,323 --> 00:09:08,720 I should be seeing a response coming from US East one, 241 00:09:08,720 --> 00:09:11,288 because we cannot connect to a piece of one. 242 00:09:11,288 --> 00:09:12,683 So it's connecting. 243 00:09:15,350 --> 00:09:17,350 And the response is coming from US East one. 244 00:09:17,350 --> 00:09:18,210 So this is perfect. 245 00:09:18,210 --> 00:09:19,800 Everything is working as expected. 246 00:09:19,800 --> 00:09:21,868 And our global accelerator is doing exactly 247 00:09:21,868 --> 00:09:23,810 what I told you it was doing. 248 00:09:23,810 --> 00:09:25,590 So now to clean up with this hands on, 249 00:09:25,590 --> 00:09:27,350 you can go to your EC 2 instances 250 00:09:27,350 --> 00:09:28,980 and terminate both of them. 251 00:09:28,980 --> 00:09:32,990 So I'm going to turn it this one in North Northern Virginia, 252 00:09:32,990 --> 00:09:34,920 and I'm going to turn it to one in Mumbai. 253 00:09:34,920 --> 00:09:36,250 And by the way, I should probably disconnect 254 00:09:36,250 --> 00:09:38,360 from a VPN you have less latency. 255 00:09:38,360 --> 00:09:40,224 So yes, I would like to terminate that instance. 256 00:09:40,224 --> 00:09:44,560 And then I'm going to go to this one in Mumbai region 257 00:09:44,560 --> 00:09:47,270 and right click and also terminate it. 258 00:09:47,270 --> 00:09:49,656 And then finally to clean up the accelerator, 259 00:09:49,656 --> 00:09:51,442 you need to go to your first accelerator, 260 00:09:51,442 --> 00:09:53,430 and you need to delete it 261 00:09:53,430 --> 00:09:55,730 and first you need to disable the accelerator. 262 00:09:57,820 --> 00:10:00,080 And once that is deleted you type delete and it will 263 00:10:00,080 --> 00:10:03,550 Go ahead to delete that accelerator all together. 264 00:10:03,550 --> 00:10:04,880 And something that's interesting to see 265 00:10:04,880 --> 00:10:07,030 is global accelerator pricing, just so you get an idea 266 00:10:07,030 --> 00:10:08,200 of how much it will cost you. 267 00:10:08,200 --> 00:10:09,897 And so we can see that we have a fixed fee. 268 00:10:09,897 --> 00:10:12,230 For every full or partial hours when 269 00:10:12,230 --> 00:10:14,280 an accelerator in running is running in your account, 270 00:10:14,280 --> 00:10:16,796 you're paying 0.0 to $5 until it is deleted. 271 00:10:16,796 --> 00:10:19,238 And then we have a data transfer fee. 272 00:10:19,238 --> 00:10:22,250 And based on the region you are coming for, 273 00:10:22,250 --> 00:10:23,680 and this destination, 274 00:10:23,680 --> 00:10:26,912 it could be between $0.01 dollar per gigabyte 275 00:10:26,912 --> 00:10:29,490 all the way to some very expensive fees, 276 00:10:29,490 --> 00:10:33,650 for example for Australia $0.08 cents per gigabyte 277 00:10:33,650 --> 00:10:34,483 of data transfer. 278 00:10:34,483 --> 00:10:36,670 So this is definitely a very expensive service 279 00:10:36,670 --> 00:10:38,638 and there's can be even more expensive in other regions, 280 00:10:38,638 --> 00:10:40,650 but it is a very worthwhile one 281 00:10:40,650 --> 00:10:43,012 and one that you're expected to know about in the exam. 282 00:10:43,012 --> 00:10:45,287 So that's it, the global accelerator is deleted 283 00:10:45,287 --> 00:10:46,840 and everything is cleaned up. 284 00:10:46,840 --> 00:10:48,590 I will see you in the next lecture.