# AWS EC2 Getting Started Guide

### What is AWS EC2?

AWS EC2 (Amazon Elastic Compute Cloud) is a cloud service that allows you to rent virtual servers, called **instances**, to run your applications or websites. Instead of buying physical hardware, you can use AWS EC2 to get the computing power you need when you need it.

### Why Use AWS EC2?

* **Scalability:** You can easily scale your server up or down based on your needs.
    
* **Cost-effective:** You only pay for what you use.
    
* **Flexible:** Supports various operating systems like Linux, Windows, etc.
    
* **Reliable:** Runs in the AWS Cloud, which is known for its security and reliability
    

### Free Tier Benefits

AWS offers a **free tier** for new users, which includes 750 hours of EC2 usage per month for a year using the **t2.micro** instance. This is great for testing or small projects.

* ---
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726110615377/c5ccdc60-d522-4401-90ea-f2299ae91c94.png align="center")

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726122753678/c3ced617-be3f-4807-8dfb-9f66b896840a.png align="center")
    
    From the AWS Management Console, search for **EC2** and open the EC2 dashboard then click Launch Instance
    

---

### Add Name and Tags

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726110671285/3e50ef5d-cf9d-4435-a6c2-cf8b1eb56796.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726110737448/6d31c1f3-8bc9-4a32-8322-b1a4cf9a1ad4.png align="center")

### **Choose an AMI (Amazon Machine Image)**

* An AMI is like a template that defines the operating system and software for your instance. For example, you can choose **Amazon Linux** (as shown in the image you provided) or other options like Ubuntu or Windows.
    

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726122852373/675596af-2c29-4e3a-b116-55fd29269e06.png align="center")

### **Choose an Instance Type**

The estimated monthly cost for running a t2.micro EC2 instance 24/7 for a 30-day month in AWS is as follows:

* SUSE: **$10.51** per month
    
* Linux: **$10.51** per month
    
* Windows: **$13.82** per month
    
* RHEL: **$20.88** per month
    

On-demand pricing refers to a payment model where users are charged based on the actual usage of resources such as compute power, storage, or network services without requiring any long-term commitments.

## **Configure Security Settings**

This involves setting up a **Security Group**, which acts like a firewall. You can define which ports (like port 22 for SSH) are allowed to connect to your instance.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726110891055/0266cda9-781f-4c2d-b491-82761a13ad73.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111287653/fba0fc56-e5f7-4128-9a50-75791208bdef.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111313995/d11e4bd9-d989-49af-af32-e256df57af20.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111350800/32996381-2c47-4f6c-8ec6-3127779f0fc0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111368663/89b89726-6d98-45f8-8555-c35ab09eea7f.png align="center")

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111381873/b374ec94-010e-47ed-99ee-3b4400eab682.png align="center")

**Launch the Instance**

* Once you’ve reviewed your configuration, click **Launch**. You will be prompted to create or use an existing **key pair**. This is needed to securely access your instance.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111390547/1a4c1128-01ba-474f-8a72-eaec16cd0a85.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111677371/5d1bf330-4888-4e84-a0b6-6adfc310c8d0.png align="center")

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111763767/28a1c72f-e97d-4071-89fb-23d2045cdb44.png align="center")

Check and connect

### **Connect to Your EC2 Instance**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111835296/6069b771-0023-410b-9bce-a335f22a8ced.png align="center")

After launching, you can connect to your instance via SSH (for Linux). AWS provides instructions on how to connect after you launch.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726111845503/d09de9a4-475f-4409-af3f-ead3f9fb0017.png align="center")

**You must know the Basic command of Linux**

Linux Basic Commands

[https://software-engineer.thirdygayares.com/linux-basic-commands](https://software-engineer.thirdygayares.com/linux-basic-commands)

Linux Git and GitHub

[https://software-engineer.thirdygayares.com/how-to-use-git-and-github-in-linux-on-red-hat-systems?source=more\_articles\_bottom\_blogs](https://software-engineer.thirdygayares.com/how-to-use-git-and-github-in-linux-on-red-hat-systems?source=more_articles_bottom_blogs)

What is a Package Manager?

[https://software-engineer.thirdygayares.com/package-manager-in-linux?source=more\_articles\_bottom\_blogs](https://software-engineer.thirdygayares.com/package-manager-in-linux?source=more_articles_bottom_blogs)
