> For the complete documentation index, see [llms.txt](https://gyansetu-aws.gitbook.io/aws-cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-aws.gitbook.io/aws-cloud/amazon-elastic-compute-cloud-amazon-ec2.md).

# Amazon Elastic Compute Cloud (Amazon EC2)

1. Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) cloud.&#x20;
2. Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy applications faster&#x20;
3. Amazon EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.

#### &#x20;Features of Amazon EC2&#x20;

* Virtual computing environments, known as instances
* &#x20;Various configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types.
* &#x20;Secure login information for your instances using key pairs (AWS stores the public key, and you store the private key in a secure place) (

#### create an ec2 instance and explain about instance family) EC2 on demand&#x20;

1. &#x20;General purpose.&#x20;
2. &#x20;Compute optimized Compute intensive application.&#x20;
3. &#x20;Memory optimized Database and memory caching application.
4. &#x20; Storage optimized Data warehousing and parallel computing

**. EC2 Options**

1. On-Demand instances Pay for the instances that you use by the hour, with no long-term commitments or up-front payments.
2. &#x20;Reserved Instances Make a low, one-time, up-front payment for an instance, reserve it for a one- or three-year term, and pay a significantly lower hourly rate for these instances.
3. &#x20;Spot instances Bid on unused instances, which can run as long as they are available and your bid is above the Spot price, at a significant discount.
4. &#x20;Dedicated hosts Pay for a physical host that is fully dedicated to running your instances, and bring your existing per-socket, percore, or per-VM software licenses to reduce costs.&#x20;

#### On demand vs Reserved vs Spot Instances&#x20;

On demand&#x20;

1. Users that want the low cost and flexibility of Amazon EC2 without any upfront payment or long term commitment.&#x20;
2. Application with short term, spiky, or unpredictable workloads that cannot be interrupted.&#x20;
3. &#x20;Application which is developed or tested on Amazon EC2 for the first time. (note: Pay per hour)&#x20;

Reserved&#x20;

1. &#x20;Application with steady state or predictable usage Eg; web servers running in an instance&#x20;
2. &#x20;Application that require specific capacity
3. &#x20; Users are able to make upfront payment to reduce the total computing cost.&#x20;

**Spot**&#x20;

1. &#x20;Application that has flexible start and end time.
2. &#x20;Application that are feasible at very low compute prices.
3. &#x20; Users with urgent computing needs for large amount of additional capacity&#x20;

**Dedicated Host**&#x20;

1. &#x20; . An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use.
2. &#x20;  Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQLServer, SUSE and Linux Enterprise Server.

&#x20;

> (create a windows instance -> go to connect option -> download the remote desktop file -> get password -> choose key pair -> get the password -> open remote desktop -> enter the password) &#x20;
