1 00:00:06,441 --> 00:00:08,235 - Here we'll run through a demo 2 00:00:08,235 --> 00:00:12,402 of launching an application on AWS Elastic Beanstalk. 3 00:00:13,256 --> 00:00:17,423 Again, from what should be by now the familiar AWS Console, 4 00:00:19,565 --> 00:00:21,694 under the Compute category, I'm just going 5 00:00:21,694 --> 00:00:24,777 to go over here to Elastic Beanstalk. 6 00:00:26,758 --> 00:00:28,024 And again, as I've mentioned, 7 00:00:28,024 --> 00:00:32,255 Elastic Beanstalk really lowers the barrier to entry 8 00:00:32,255 --> 00:00:34,037 into Amazon Web Services. 9 00:00:34,037 --> 00:00:36,470 There are plenty of developers out there 10 00:00:36,470 --> 00:00:40,799 who either don't have time or the inclination 11 00:00:40,799 --> 00:00:44,026 to bother with the underlying infrastructure. 12 00:00:44,026 --> 00:00:45,540 They just want to write code. 13 00:00:45,540 --> 00:00:48,585 They just want to ship code and allow something else 14 00:00:48,585 --> 00:00:51,697 or someone else to deal with infrastructure. 15 00:00:51,697 --> 00:00:55,520 And so, Amazon Elastic Beanstalk is the answer to that. 16 00:00:55,520 --> 00:00:58,930 So here, it's really easy to get started. 17 00:00:58,930 --> 00:01:03,293 In fact, for those of us who are coding with Java 18 00:01:03,293 --> 00:01:07,460 using Eclipse or .NET using Microsoft Visual Studio, 19 00:01:08,883 --> 00:01:11,804 there are plugins into those IDEs 20 00:01:11,804 --> 00:01:15,590 that make it really easy to get your application 21 00:01:15,590 --> 00:01:19,340 into Elastic Beanstalk directly from your IDE 22 00:01:20,211 --> 00:01:23,675 without ever having to log into the AWS Console. 23 00:01:23,675 --> 00:01:26,392 You can just stay right there within your IDE 24 00:01:26,392 --> 00:01:29,712 and deploy versions of your code directly 25 00:01:29,712 --> 00:01:32,076 into Elastic Beanstalk. 26 00:01:32,076 --> 00:01:35,071 So for the sake of this demo, we're just going 27 00:01:35,071 --> 00:01:38,502 to choose one of these preconfigured platforms. 28 00:01:38,502 --> 00:01:42,287 I've been a fan of both Go and Node.js 29 00:01:42,287 --> 00:01:45,665 for a number of years now, and a lot of the places 30 00:01:45,665 --> 00:01:48,359 that I have worked or clients that I have worked with 31 00:01:48,359 --> 00:01:50,501 leverage Node.js very heavily. 32 00:01:50,501 --> 00:01:52,507 So that's what I'm familiar with, 33 00:01:52,507 --> 00:01:54,518 so then we're gonna go ahead and choose that. 34 00:01:54,518 --> 00:01:57,920 You can see here that by choosing that 35 00:01:57,920 --> 00:02:01,731 we're going to create an environment running Node.js 36 00:02:01,731 --> 00:02:04,410 on 64-bit Amazon Linux. 37 00:02:04,410 --> 00:02:07,450 So I'll go ahead and launch that. 38 00:02:07,450 --> 00:02:08,293 There we go. 39 00:02:08,293 --> 00:02:12,972 Elastic Beanstalk is launching our environment. 40 00:02:12,972 --> 00:02:15,271 Now, behind the scenes, Elastic Beanstalk 41 00:02:15,271 --> 00:02:18,938 does actually make use of AWS CloudFormation 42 00:02:20,797 --> 00:02:23,854 but it sort of wraps a convenience wrapper around that. 43 00:02:23,854 --> 00:02:26,323 It gives us much more convenience 44 00:02:26,323 --> 00:02:30,102 and like I said, a lower barrier to entry. 45 00:02:30,102 --> 00:02:33,203 We can view the events as it's launching our environment. 46 00:02:33,203 --> 00:02:36,453 There we go, created the load balancer. 47 00:02:40,985 --> 00:02:43,083 We can always refresh this if we think 48 00:02:43,083 --> 00:02:45,573 it's going a little slow. 49 00:02:45,573 --> 00:02:48,168 Here's our configuration settings. 50 00:02:48,168 --> 00:02:51,859 So you can see, while it's building we'll review this. 51 00:02:51,859 --> 00:02:53,810 We can adjust the scaling. 52 00:02:53,810 --> 00:02:55,819 We can say, "Yes, this environment type 53 00:02:55,819 --> 00:02:58,327 "should be load balanced and auto scaled." 54 00:02:58,327 --> 00:03:01,053 We don't really need to know what it takes 55 00:03:01,053 --> 00:03:04,642 to achieve that as long as we're using Elastic Beanstalk. 56 00:03:04,642 --> 00:03:06,359 All we need to do is come in here 57 00:03:06,359 --> 00:03:09,774 and click the gear and say, "Yeah, that's what I want. 58 00:03:09,774 --> 00:03:12,304 "I want it to be load balanced and auto scaled 59 00:03:12,304 --> 00:03:14,944 "and allow the service to handle the creation 60 00:03:14,944 --> 00:03:16,694 "of those resources." 61 00:03:18,447 --> 00:03:21,806 With auto scaling, we could say, 62 00:03:21,806 --> 00:03:24,008 "You know what, I want a minimum of one, 63 00:03:24,008 --> 00:03:28,275 "maybe a maximum of four, maybe a maximum of 40, 64 00:03:28,275 --> 00:03:30,856 "whatever it is that we're willing to pay for." 65 00:03:30,856 --> 00:03:34,051 It doesn't really matter what availability zones are used. 66 00:03:34,051 --> 00:03:37,406 Perhaps I want to use all three. 67 00:03:37,406 --> 00:03:39,989 We can define scaling triggers. 68 00:03:41,363 --> 00:03:46,171 On this one, it appears that we have scaling triggers set 69 00:03:46,171 --> 00:03:51,077 to measure the NetworkOut or the amount of network traffic 70 00:03:51,077 --> 00:03:52,946 that's going out. 71 00:03:52,946 --> 00:03:56,862 We're going to average that over five minutes. 72 00:03:56,862 --> 00:03:59,482 And then, when it's above a certain threshold, 73 00:03:59,482 --> 00:04:01,374 when it's about six megs, 74 00:04:01,374 --> 00:04:05,183 then we can trigger a scaling event. 75 00:04:05,183 --> 00:04:08,968 We can adjust the type of instances that we want, 76 00:04:08,968 --> 00:04:10,807 t2.micro it looks to be the default, 77 00:04:10,807 --> 00:04:13,101 but we could change that if we wanted to. 78 00:04:13,101 --> 00:04:17,268 Perhaps we would prefer something like an m4.large. 79 00:04:18,226 --> 00:04:19,794 And of course, we can't really save this 80 00:04:19,794 --> 00:04:22,644 while our environment is currently building. 81 00:04:22,644 --> 00:04:25,117 We'll have to wait until that is complete 82 00:04:25,117 --> 00:04:27,570 before we can make any of these changes. 83 00:04:27,570 --> 00:04:30,568 But you can see that the service makes 84 00:04:30,568 --> 00:04:33,697 all of these different settings 85 00:04:33,697 --> 00:04:37,022 that would normally be found in various different places. 86 00:04:37,022 --> 00:04:39,744 It brings them all together under one UI 87 00:04:39,744 --> 00:04:42,578 and it makes it really easy to configure 88 00:04:42,578 --> 00:04:45,957 an application and the underlying infrastructure. 89 00:04:45,957 --> 00:04:49,080 You can see here we're using node version 6.9.1 90 00:04:49,080 --> 00:04:52,429 which happens to be the latest at the time of this video. 91 00:04:52,429 --> 00:04:55,701 And we're still waiting on that application 92 00:04:55,701 --> 00:04:57,589 to become healthy. 93 00:04:57,589 --> 00:04:58,722 And there we go. 94 00:04:58,722 --> 00:04:59,871 It looks like it's up. 95 00:04:59,871 --> 00:05:01,897 So we can go back to the Dashboard here. 96 00:05:01,897 --> 00:05:05,601 You can see that our application is running. 97 00:05:05,601 --> 00:05:08,369 It says that the health is okay. 98 00:05:08,369 --> 00:05:11,191 And the Recent Events says that we've added 99 00:05:11,191 --> 00:05:12,774 some EC2 instances. 100 00:05:14,651 --> 00:05:16,317 We've launched our environment, 101 00:05:16,317 --> 00:05:18,341 and everything is up and running. 102 00:05:18,341 --> 00:05:19,508 Now from here, 103 00:05:21,166 --> 00:05:25,373 here's the URL for that particular load balancer. 104 00:05:25,373 --> 00:05:29,651 If I were to click that, we should get, there we go. 105 00:05:29,651 --> 00:05:34,196 We get the default page for that application. 106 00:05:34,196 --> 00:05:38,962 And this particular webpage came from a Node.js application 107 00:05:38,962 --> 00:05:43,129 running on an EC2 instance behind a load balancer. 108 00:05:44,812 --> 00:05:49,376 So if we wanted to upload our own application, 109 00:05:49,376 --> 00:05:52,501 then all we would have to do is package it appropriately 110 00:05:52,501 --> 00:05:54,788 and then upload and deploy. 111 00:05:54,788 --> 00:05:58,096 So again, Elastic Beanstalk makes it really easy 112 00:05:58,096 --> 00:06:01,812 for just about anyone to get their application 113 00:06:01,812 --> 00:06:05,467 into Amazon Web Services very quickly and very easily. 114 00:06:05,467 --> 00:06:09,634 And that is launching an application on Elastic Beanstalk.