- Now let's run through a demo of launching
a Windows instance on Amazon EC2.
You can see we're logged in to the AWS console.
Again, we're in the Ohio region.
We can see that we have one running instance,
our Linux instance that we launched already.
And from here we're going to go ahead
and launch a Windows instance.
Again, EC2 instances start with the AMI.
So I'm going to click over here.
And I've already done some research,
just to save a little bit of time,
and found the Windows AMI that I want
which is this one here.
So if you know the ID, you can just paste it there
and this one is going to be Windows server
2012.R2 English 64 bit.
So I'm going to click that.
I'm going to pull this up.
You can see some more details around that at the bottom.
So I'm going to go ahead a click launch.
The T2 micro, again, is free tier eligible
so in the cases where you're just wanting to experiment
or check things out,
be sure that you make use of that free tier.
So I'm going to go ahead a click next
and configure the instance details.
Again, in this particular case we only need one
but we could launch more if we really wanted to.
I'm going to make sure that I'm in the appropriate VPC 10.2.
I'm also going to choose a public subnet.
Either one of these would suffice.
I'm going to go ahead a choose public B.
I'm going to ensure that I'm getting
an auto assigned public IP.
I'm going to make sure that I have the IM roll attached
so that later I can make use of that if I need to.
I'm going to scroll down here
just to remind you that such things as user data
and other things are found here
from when you go to work with that.
I'm going to take a look at storage.
You can see here that Windows needs a bit more space
than Linux so these machines default to a 30 gig volume.
In this case it's defaulting to general purpose SSD.
So our root volume will be based on an elastic block store,
which is separate from the machine and we'll talk more
about the details of that service later on.
You can also see that this particular volume
has the flag to leave on termination enabled
so that when we terminate this instance
this particular volume will also be terminated.
But that's optional.
You can uncheck that
if you want the root volume to stick around
after the instance is terminated.
We're going to tag this instance,
again, I'm going to call this one the Windows Server.
Perhaps give it an environment tag.
Again, be sure to leverage tagging.
Really great way to organize your infrastructure.
There's also a way,
if you leverage what's called detailed billing,
detailed billing can send logs every six hours or so,
it can send logs to an S3 bucket
and your billing can be broken down by tags.
So if you're leveraging tags consistently
you can see exactly what you're paying for
across different environments,
across different business units,
across different applications and so on.
And so I'm going to call this one Dev.
You can see that this comes up
because I've used that before.
Let's configure the security group.
I'm going to select an existing group, the web server.
So in case I wanted to run IIS here
or something else that's running on port 80 or 443
and I also want to,
in this case I've already gone and made a change
to the SSH security group
that also allows port 3389 for RDP.
So I'm going to review and launch.
Make sure that we're running a T2 micro,
we have the right security groups,
yes RDP is open on that one.
We have the right size volume,
and we have the right tags in place.
I'm going to go ahead and launch that.
Here, since we've already created a key pair,
now remember key pairs are necessary
in order to be able to actually authenticate
into the operating system of your machine.
So I'm going to acknowledge yes, I have this key.
And I'm going to launch that instance.
So from here I can click this ID
and see that my Windows server is in a pending state.
And it will be there for however long
it takes that machine to boot.
Linux instances typically boot much faster.
But the Windows server here is going to take a few minutes.
Okay, so now you can see that our machine has changed
into a running state.
So one thing to note is that so long as your machine
is in a state ending in ing
such as running, pending, terminating, stopping,
any of those types of states,
you will be paying the hourly cost of that machine
if you're using the on demand billing model
or the spot billing model.
As soon as the machine goes into a stopped state
or a terminated state, that's when you stop paying.
So from here, again I'm going to take this
public IP address, I'm going to copy that,
I'm going to switch over into the remote desktop.
I'm going to create a new connection here.
The name would be administrator.
Now the password,
the password we need to get here from the AWS console.
I'm going to say get Windows password.
And now you'll see here,
in order to get that administrator password,
it was encrypted using the public half of our key pair.
You can see the public half of the live lessons key.
Amazon does not keep the private half.
So in order to decrypt this password,
we need to paste the private half in there.
So here,
what I'm going to do,
is I'm going to
echo that out in a way that will let me copy that.
I'm going to pipe that to PB copy.
So now it's copied to my paste board
and now from here I can paste that private key
into that window and now I can decrypt the Windows password.
And so you can see here, again, here's my public IP.
Username is administrator and my password,
I'm going to copy that, paste that there.
And then, I'm going to double click on that.
It says the certificate can not be verified.
That's okay, I understand that.
I'm going to just say continue.
And sometimes it takes a minute for that to come up.
And there we go, now we have an RDP session
into our Windows server running on EC2.
And there we are.
Now we're at the desktop of our Windows Server 2012.R2.
From here we can go about our business,
do what we need to do to get this machine configured.
If we want to install any applications,
if we want to add users,
configure this particular system,
however it's meant to be run.
And from there we would want to be sure
to create an Amazon machine image from it
so that we could clone this if we needed to.
In the case of systems that are meant to be distributed,
it would be important that we create a machine image
that would allow these systems to scale very quickly.
Again, it's important to think of these systems
as being automated.
We don't want to have to log in
and do things manually every time.
We want them to be automated.
So from here, again, I can go to the start menu
and do whatever I need to do.
From here, I'm just going to go ahead and log out
and that will be our demo
of launching a Windows instance on Amazon EC2.