> For the complete documentation index, see [llms.txt](https://courses.learnwithprayag.com/linux/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://courses.learnwithprayag.com/linux/linux-installation-on-aws/lab-create-linux-ubuntu22-ec2-instance-using-aws-console.md).

# Lab: Create Linux Ubuntu22 EC2 Instance using AWS Console

Search EC2 and click on it

<figure><img src="/files/p4TczqfUcvAFMruYUiYr" alt=""><figcaption></figcaption></figure>

Click on launch instance

<figure><img src="/files/lZgpoMjGR7kYifvcXCWt" alt=""><figcaption></figcaption></figure>

Enter details

Name : webserver

<figure><img src="/files/LE8qjmpaFIN3bQFYZs9h" alt=""><figcaption></figcaption></figure>

Select Ubuntu server 22.04

<figure><img src="/files/z77xHOxG3KlXqb0jKg8j" alt=""><figcaption></figcaption></figure>

Select t2 micro as instance type

<figure><img src="/files/tJqyMo3fIeEsk3vgfBh4" alt=""><figcaption></figcaption></figure>

Next, we will key pair to login using putty, click on "Create new key pair"

<figure><img src="/files/TJqztqryvbmlKS9fzxXg" alt=""><figcaption></figcaption></figure>

Enter key pair details -

Key pair name - login-keypair

Key pair type - RSA

Private key format - ppk

<figure><img src="/files/72Oqx6jVqal8QZrWJU8D" alt=""><figcaption></figcaption></figure>

When we click on "Create key pair"

It will download the private key. Remember the path where its downloaded.

<figure><img src="/files/yFeqngWJQGAvcgk7iXmH" alt=""><figcaption></figcaption></figure>

In network settings -

Click on Create security group and allow ssh,http,https traffic

<figure><img src="/files/T2c9V0gm1aveXU5r9Qs1" alt=""><figcaption></figcaption></figure>

In storage section for system disk select size 30GB

<figure><img src="/files/11glMH0KxWHVQDNGFSDz" alt=""><figcaption></figcaption></figure>

On right hand side we can see the Summary and an option to Launch an Instance

<figure><img src="/files/l8L3rngCtHh5s7fHU2hJ" alt=""><figcaption></figcaption></figure>

Click on Launch instance. We can see instance is launched

<figure><img src="/files/qO0c0R4zvv1NtH4AaOfk" alt=""><figcaption></figcaption></figure>

In Instances we can see that its Initializing

<figure><img src="/files/PIYzQdGfr813wKLyK475" alt=""><figcaption></figcaption></figure>

After few minutes we can see that AWS instance is in Running state

Instance is Ready

<figure><img src="/files/IgB7noCto0mklcC5Clw6" alt=""><figcaption></figcaption></figure>

To connect using AWS shell (ssh in browser) Click on Instance ID

<figure><img src="/files/tVWRHirefacR8Um48dWW" alt=""><figcaption></figcaption></figure>

Click on Connect&#x20;

Select default option "EC2 Instance Connect" (note down the username)

<figure><img src="/files/GEMFlP6ydwRWmqVPv9M6" alt=""><figcaption></figcaption></figure>

When we click on Connect new tab will open and we get the shell

<figure><img src="/files/u7RDDWqxJf7719fCtd58" alt=""><figcaption></figcaption></figure>

**Login using Putty** \
\
We can login using private key as well, using key which we downloaded earlier via putty

Open putty

Click on Session and Specify the IP

<figure><img src="/files/ix2PC6hpCiDwaIEulagt" alt=""><figcaption></figcaption></figure>

Next, click on Connection > Auth > Credentials&#x20;

Browse downloaded keypair.ppk and click on Open

<figure><img src="/files/zzQTOD5ub81vUcCXzNLN" alt=""><figcaption></figcaption></figure>

We will be connected

<figure><img src="/files/48qyErLHGV9OYHnmYEoN" alt=""><figcaption></figcaption></figure>
