Amazon EC2 ( Elastic Compute Cloud )
Published: 2021-07-21 15:02:59

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tqd16v6z9eqbznfrbjed.png)

**_Amazon EC2_** is a compute service that provides secure, resizable compute capacity in the cloud as Amazon EC2 instances. 


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi6msnzcxx1pk9kfu7pb.jpg)

Consider a scenario in which you have to design architecture for your resources for your newly created website. With the traditional on-premises resources, you have to do the following stuff:
1. Spend money to purchase hardware for data centers.
2. Wait for the servers to be delivered to you.
3. Install the servers in your data centers.
4. Do all the required configurations.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5bnafdfm9j546m79avzj.jpeg)

On the other hand, with an Amazon EC2 instance you can use a virtual server to run applications in the AWS Cloud without worrying about the underlying hardware and its configurations. With Amazon EC2, you can do the following:
1. Configure and launch an Amazon EC2 instance within minutes and stop using it when you have finished your work.
2. Pay just for the compute time you utilize when an instance is running, not when it's stopped or terminated.
3. Save costs by paying just for server capacity that you simply need or want.



**Amazon EC2 Instance Types** 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zm4169in480tefjogiev.png)

**_Amazon EC2 instance types_** are optimized for different tasks considering the specific requirements like compute, storage or memory capabilities.

1. _General Purpose Instances_ - These provide a balance of compute, memory, and networking resources. They are used for a variety of workloads, such as application servers, gaming servers, backend servers for enterprise applications, small and medium databases and many more.

2. _Compute Optimized Instances_ - These are used for compute-bound applications that benefit from high-performance processors. They are used for high-performance web servers, compute-intensive applications servers, and dedicated gaming servers.

3. _Memory Optimized Instances_ - These are designed to deliver fast performance for workloads that process large datasets in memory. They enable you to run workloads with high memory needs and receive great performance.

4. _Accelerated Computing Instances_ - These use hardware accelerators, or coprocessors, to perform some functions more efficiently than is possible in software running on CPUs. They are ideal for workloads such as graphics applications, game streaming, and application streaming.

5. _Storage Optimized Instances_ - These are designed for workloads that require high, sequential read and write access to large datasets on local storage. They are designed to deliver tens of thousands of low-latency, random Input/Output Operations Per Second (IOPS) to applications.

**Amazon EC2 Pricing**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/krtnslxxt5i0jy6avqe6.png)

With Amazon EC2, you pay only for the compute time that you use. Amazon EC2 offers a variety of pricing options for different use cases.

1. _On-Demand Instances_ - These are ideal for short-term, irregular workloads that cannot be interrupted. The instances run continuously until you stop them, and you pay for only the compute time you utilize. There aren't any upfront costs or minimum contracts.

2. _Amazon EC2 Savings Plan_ - These enable you to reduce your compute costs by committing to a consistent amount of compute usage for a 1-year or 3-year term. This term commitment results in savings of up to 66% over On-Demand costs. Any usage beyond the commitment is charged at regular On-Demand rates.

3. _Reserved Instances_ - These are a billing discount applied to the use of On-Demand Instances. You can purchase Standard Reserved and Convertible Reserved Instances for a 1-year or 3-year term, and Scheduled Reserved Instances for a 1-year term. You get greater cost savings with the 3-year term.

4. _Spot Instances_ - These are ideal for workloads with flexible start and end times, or that can withstand interruptions. Spot Instances use unused Amazon EC2 computing capacity and offer you cost savings at up to 90% off of On-Demand prices.

5. _Dedicated Hosts_ - These are physical servers with Amazon EC2 instance capacity that is fully dedicated to your use. Dedicated Hosts are the most expensive.


Please feel free to write @ rewooparth.rp@gmail.com for any queries on Amazon EC2 & stay tuned for next write-up.

Thank you!