5.3 Create Your First EC2 Instance Part 2
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
welcome back to part two of our easy to lab.
00:03
As you can see, we're on my *** unto Lennox VM.
00:09
I am using the linens, Veum,
00:11
because it is much easier interact with are easy to instance natively
00:15
from the terminal.
00:17
If you are using a windows machine for this video,
00:20
then you will need to download putty.
00:23
For those of you who may not be familiar with putty,
00:26
it's a free terminal emulator
00:29
that will lie you to interact with your PC. To instance,
00:34
some things are slightly different.
00:36
So I will make a second video to show you how to set up putty from a Windows box.
00:42
So if you recall from the last lesson
00:45
I downloaded the private key that AWS generated for us
00:49
to my documents directory.
00:52
So what I will do now is create a new directory
00:56
called
00:57
sshh, underscore keys.
01:03
I will run the L s command
01:06
to ensure that the new directory has been created.
01:11
Is there good?
01:12
So
01:14
now I will move our private key to the SS H Keys directory.
01:23
Next,
01:23
let's change into that directory.
01:27
We will run a L s command again to verify that the move was successful.
01:33
Awesome.
01:34
Now we need to change the permissions on our private key to make it read only
01:41
this is very important for the security of our private key.
01:44
So
01:46
let's make ourselves route,
01:49
then run ch mod
01:52
400
01:53
to make the file permissions read. Only
02:01
we can verify the commission by running
02:05
l s
02:07
space dash A L.
02:09
This shows us that the file is now read only.
02:14
So
02:15
now we are ready to log into our e c two instance
02:21
we need to type
02:22
sssh space e c to dash
02:25
user
02:28
at
02:32
Then we paste in that public i p address that we copied from the last lesson.
02:38
Next
02:40
we provide the dash I flag, which is telling our easy to instance to read the identity file,
02:47
which is our private key for authentication.
02:53
So
02:53
let's copy and paste our file name.
02:57
Remember that without this private key, we will not be able to authenticate toh ar e c two instance
03:04
hit enter
03:08
And now we see the EEC, to instance, has responded to us
03:13
and it's telling us that has never seen our key before.
03:17
This is normal for the first time that we log in.
03:21
So we type Yes.
03:23
And now the EEC, to instance, will add a copy of our key toe a host file.
03:30
The next time that we log in, it will compare the key that we present
03:34
to the one in its host file and basically will say, Oh, yeah, I know you already
03:45
Now we have successfully authenticated toe are easy to instance,
03:51
if you recall from previous lessons
03:53
A W S provides the basic operating system that are easy to system will run on
04:00
We are responsible for the security updates software etcetera
04:04
A. W s calls this the shared responsibility model
04:11
right away
04:13
R e c two instances informing us
04:15
that we need to apply at least six of the 14 security updates
04:19
that are available, for instance.
04:24
So
04:25
let's update those now
04:29
we need to change to root.
04:31
Now
04:32
this part is a matter of preference.
04:35
We use yum toe update this flavor of lyrics.
04:40
Since this will be our Web server,
04:42
I like to install the Web server first
04:45
and then apply all the updates.
04:47
So let's type yum space install
04:51
space. H t t p D
04:56
to load Apache server.
04:59
We had a dash why,
05:00
so that it was installed without prompting us.
05:05
Next we perform a young update dash. Why?
05:10
To install the necessary system updates.
05:24
Next,
05:25
Let's create a landing page for our Web server.
05:29
We change directories to force Last bar forward slash dubbed dubbed up
05:34
forward slash html.
05:44
From here, we use a text editor.
05:46
I use Nano
05:47
to make a static home page for our Web server.
05:53
We will name the file index dot html,
06:02
and I will paste in simple HTML coat,
06:06
then click control Dash X to close out the file.
06:12
When asked to save
06:14
perform a shift. Why, then enter?
06:19
Awesome.
06:21
Next,
06:23
we need to enable the Apache server on our instance.
06:28
So we type
06:29
service space.
06:30
H t t p d Space start, then enter.
06:39
Finally, we are ready to test our Web server.
06:43
Let's open up a browser
06:46
and type in the I. P address of our easy to instance
06:56
Hit Enter
06:58
and there is our web page.
07:00
Great job, everyone.
07:09
In this video,
07:11
we created our first easy to instance,
07:15
we created our first security group.
07:19
We created a P K I I ke pair for our easy to instance,
07:25
and
07:26
we created a Web server
07:29
on our instance
Up Next
Similar Content