- Here we'll run through a demo
of launching an application on AWS Elastic Beanstalk.
Again, from what should be by now the familiar AWS Console,
under the Compute category, I'm just going
to go over here to Elastic Beanstalk.
And again, as I've mentioned,
Elastic Beanstalk really lowers the barrier to entry
into Amazon Web Services.
There are plenty of developers out there
who either don't have time or the inclination
to bother with the underlying infrastructure.
They just want to write code.
They just want to ship code and allow something else
or someone else to deal with infrastructure.
And so, Amazon Elastic Beanstalk is the answer to that.
So here, it's really easy to get started.
In fact, for those of us who are coding with Java
using Eclipse or .NET using Microsoft Visual Studio,
there are plugins into those IDEs
that make it really easy to get your application
into Elastic Beanstalk directly from your IDE
without ever having to log into the AWS Console.
You can just stay right there within your IDE
and deploy versions of your code directly
into Elastic Beanstalk.
So for the sake of this demo, we're just going
to choose one of these preconfigured platforms.
I've been a fan of both Go and Node.js
for a number of years now, and a lot of the places
that I have worked or clients that I have worked with
leverage Node.js very heavily.
So that's what I'm familiar with,
so then we're gonna go ahead and choose that.
You can see here that by choosing that
we're going to create an environment running Node.js
on 64-bit Amazon Linux.
So I'll go ahead and launch that.
There we go.
Elastic Beanstalk is launching our environment.
Now, behind the scenes, Elastic Beanstalk
does actually make use of AWS CloudFormation
but it sort of wraps a convenience wrapper around that.
It gives us much more convenience
and like I said, a lower barrier to entry.
We can view the events as it's launching our environment.
There we go, created the load balancer.
We can always refresh this if we think
it's going a little slow.
Here's our configuration settings.
So you can see, while it's building we'll review this.
We can adjust the scaling.
We can say, "Yes, this environment type
"should be load balanced and auto scaled."
We don't really need to know what it takes
to achieve that as long as we're using Elastic Beanstalk.
All we need to do is come in here
and click the gear and say, "Yeah, that's what I want.
"I want it to be load balanced and auto scaled
"and allow the service to handle the creation
"of those resources."
With auto scaling, we could say,
"You know what, I want a minimum of one,
"maybe a maximum of four, maybe a maximum of 40,
"whatever it is that we're willing to pay for."
It doesn't really matter what availability zones are used.
Perhaps I want to use all three.
We can define scaling triggers.
On this one, it appears that we have scaling triggers set
to measure the NetworkOut or the amount of network traffic
that's going out.
We're going to average that over five minutes.
And then, when it's above a certain threshold,
when it's about six megs,
then we can trigger a scaling event.
We can adjust the type of instances that we want,
t2.micro it looks to be the default,
but we could change that if we wanted to.
Perhaps we would prefer something like an m4.large.
And of course, we can't really save this
while our environment is currently building.
We'll have to wait until that is complete
before we can make any of these changes.
But you can see that the service makes
all of these different settings
that would normally be found in various different places.
It brings them all together under one UI
and it makes it really easy to configure
an application and the underlying infrastructure.
You can see here we're using node version 6.9.1
which happens to be the latest at the time of this video.
And we're still waiting on that application
to become healthy.
And there we go.
It looks like it's up.
So we can go back to the Dashboard here.
You can see that our application is running.
It says that the health is okay.
And the Recent Events says that we've added
some EC2 instances.
We've launched our environment,
and everything is up and running.
Now from here,
here's the URL for that particular load balancer.
If I were to click that, we should get, there we go.
We get the default page for that application.
And this particular webpage came from a Node.js application
running on an EC2 instance behind a load balancer.
So if we wanted to upload our own application,
then all we would have to do is package it appropriately
and then upload and deploy.
So again, Elastic Beanstalk makes it really easy
for just about anyone to get their application
into Amazon Web Services very quickly and very easily.
And that is launching an application on Elastic Beanstalk.