DEV Community

Ige Olanrewaju Ogunlade
Ige Olanrewaju Ogunlade

Posted on

Deploy an EC2 Instance in AWS, connect to it and install nginx

Introduction:

Amazon EC2, part of AWS, is a versatile cloud service offering resizable compute capacity. It enable users to launch virtual servers, or instances that is tailored to specific needs by choosing from various instance types, operating systems, and networking configurations. It enables users to scale resources dynamically in a cost economic effective way. It has features like Auto Scaling and Elastic Load Balancing to enhance performance and availability. This service simplifies infrastructure management, empowering technical users to focus on developing scalable and reliable applications in the cloud.

We will explore easy to deploy EC2 in AWS, we will connect into it and also install nginx (an open-source web server)

1. Log in to you account

If you don't have, you can create free account

2. Choose the region you want to deploy the machine
On the AWS console homepage, choose a location from the drop down as shown in the diagram below:

Image description

  1. Search for the machine EC2 on the aws web browser

Image description

4. Click EC2 and launch instance

Image description

5. Choose a name for the machine and also select the OS(image)
The preferred name: IgeEC2
Operating system: Ubuntu

Image description
The image selected is Canonical, Ubuntu, 22.04 LTS, amd64.

6. Selection of Instance Type
In AWS, an Instance Type refers to a predefined combination of virtual hardware, including CPU, memory, storage, and networking capacity, used for deploying EC2 instances. Users can choose an instance type that best suits their application's requirements, with options ranging from compute-optimized for processing power to memory-optimized for applications demanding more RAM.

Image description

7. Create Key pair (login)
This key pair will be needed for ssh connection.
Image description

Image description

8. Create Network Settings

Image description

9. Launch the instance

Image description

  1. The deployment is running

Image description

Image description

  1. We need to connect to the EC2 Note that we have key pair to connect already we will ssh into the EC2

Image description

12. Powershell into the EC2 from the host
This will enable installation of web browser nginx.

Top comments (0)