# Launching an EC2 Instance on AWS

**What is EC2, and why is it important?**

* Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud.
    
* Access reliable, scalable infrastructure on demand. Scale capacity within minutes with SLA commitment of 99.99% availability.
    
* Optimize performance and cost with flexible options like AWS Graviton-based instances, Amazon EC2 Spot instances, and AWS Savings Plans.
    

**Benefits :**

Deliver secure, reliable, high-performance, and cost-effective compute infrastructure to meet demanding business needs. Access the on-demand infrastructure and capacity you need to run HPC applications faster and cost-effectively. Access environments in minutes, dynamically scale capacity as needed, and benefit from AWS’s pay-as-you-go pricing.

**EC2 Instance Types:**

1. General purpose
    
2. Compute optimized
    
3. Memory optimized
    
4. Storage optimized
    
5. Accelerated computing
    

**General purpose:**

General Purpose instances are designed to deliver a balance of compute, memory, and network resources. They are suitable for a wide range of applications, including web servers, small databases, development and test environments, and more.

**Compute optimized :**

Compute Optimized instances provide a higher ratio of compute power to memory. They excel in workloads that require high-performance processing such as batch processing, scientific modeling, gaming servers, and high-performance web servers.

**Memory optimized :**

Memory Optimized instances are designed to handle memory-intensive workloads. They are suitable for applications that require large amounts of memory, such as in-memory databases, real-time big data analytics, and high-performance computing.

**Storage optimized :**

Storage Optimized instances are optimized for applications that require high, sequential read and write access to large datasets. They are ideal for tasks like data warehousing, log processing, and distributed file systems.

**Accelerated computing :**

Accelerated Computing Instances typically come with one or more types of accelerators, such as Graphics Processing Units (GPUs), Field Programmable Gate Arrays (FPGAs), or custom Application Specific Integrated Circuits (ASICs). These accelerators offload computationally intensive tasks from the main CPU, enabling faster and more efficient processing for specific workloads.

### Launching an EC2 Instance on AWS :

Sign in to the AWS Management Console

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722011434559/8ab98533-d271-4c41-863e-637a376e376d.png align="center")

**Open the EC2 Console Once you are signed in to the AWS**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722010631087/e3192022-761b-4fc0-9ed1-80953c12ec40.png align="center")

Click launch instances

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012033980/193503a3-e72c-40a5-a245-b80037c9b677.png align="center")

Provide a Name for the EC2 Instance

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012091184/8ef2088c-19a9-4ad8-9d85-e20fc467ce23.png align="center")

Choose an Amazon Machine Image (AMI)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012629367/ed262c3f-0656-4915-a549-c1ef5f7c1179.png align="center")

Choose an Instance Type

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012204020/a7b61b99-466d-4372-8d44-ff0be4e71e8a.png align="center")

Create a Key Pair

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012315748/81ca703e-fed8-4231-a24e-3c4ea48b0ce0.png align="center")

Set key pair name & Create key pair

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012387011/e432a193-4615-4f49-95f7-d4c0bd541f28.png align="center")

Click launch instance

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012720151/ce5fec5d-706e-4bb3-8e01-a69aae01ab9c.png align="center")

After launching the instance, you will be redirected to a page displaying a success dialogue box

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012813113/b7e9cdda-58c9-4b98-99ce-a5ea02bac31d.png align="center")

Click on the instance ID will take you to the EC2 Instances page

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1722012941567/bbe969c7-a41a-4ad4-8c91-042d76119404.png align="center")

Now, successfully launched EC2 instance on AWS.
