Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.
Benefits of Amazon Elastic Compute Cloud (Amazon EC2)
Elastic Web-Scale Computing
Amazon EC2 enables you to increase or decrease capacity within minutes, not hours or days. You can commission one, hundreds or even thousands of server instances simultaneously. Of course, because this is all controlled with web service APIs, your application can automatically scale itself up and down depending on its needs.
You have complete control of your instances. You have root access to each one, and you can interact with them as you would any machine. You can stop your instance while retaining the data on your boot partition and then subsequently restart the same instance using web service APIs. Instances can be rebooted remotely using web service APIs. You also have access to console output of your instances.
Flexible Cloud Hosting Services
You have the choice of multiple instance types, operating systems, and software packages. Amazon EC2 allows you to select a configuration of memory, CPU, instance storage, and the boot partition size that is optimal for your choice of operating system and application. For example, your choice of operating systems includes numerous Linux distributions, and Microsoft Windows Server.
Designed for use with other Amazon Web Services
Amazon EC2 works in conjunction with Amazon Simple Storage Service (Amazon S3), Amazon Relational Database Service (Amazon RDS), Amazon SimpleDB and Amazon Simple Queue Service (Amazon SQS) to provide a complete solution for computing, query processing and storage across a wide range of applications.
Amazon EC2 offers a highly reliable environment where replacement instances can be rapidly and predictably commissioned. The service runs within Amazon’s proven network infrastructure and data centers. The Amazon EC2 Service Level Agreement commitment is 99.95% availability for each Amazon EC2 Region.
Amazon EC2 works in conjunction with Amazon VPC to provide security and robust networking functionality for your compute resources.
- Your compute instances are located in a Virtual Private Cloud (VPC) with an IP range that you specify. You decide which instances are exposed to the Internet and which remain private.
- Security Groups and networks ACLs allow you to control inbound and outbound network access to and from your instances.
- You can connect your existing IT infrastructure to resources in your VPC using industry-standard encrypted IPsec VPN connections.
- You can provision your EC2 resources as Dedicated Instances. Dedicated Instances are Amazon EC2 Instances that run on hardware dedicated to a single customer for additional isolation.
- For more information on Amazon EC2 security refer to our Amazon Web Services: Overview of Security Process document.
If you do not have a default VPC you must create a VPC and launch instances into that VPC to leverage advanced networking features such as private subnets, outbound security group filtering, network ACLs, Dedicated Instances, and VPN connections.
Amazon EC2 passes on to you the financial benefits of Amazon’s scale. You pay a very low rate for the compute capacity you actually consume. See Amazon EC2 Instance Purchasing Options for a more detailed description.
- On-Demand Instances – On-Demand Instances let you pay for compute capacity by the hour with no long-term commitments. This frees you from the costs and complexities of planning, purchasing, and maintaining hardware and transforms what are commonly large fixed costs into much smaller variable costs. On-Demand Instances also remove the need to buy “safety net” capacity to handle periodic traffic spikes.
- Reserved Instances – Reserved Instances provide you with a significant discount (up to 75%) compared to On-Demand Instance pricing. There are three Reserved Instance payment options (No Upfront, Partial Upfront, All Upfront) that enable you to balance the amount you pay upfront with your effective hourly price. The Reserved Instance Marketplace is also available, which provides you with the opportunity to sell Reserved Instances if your needs change (i.e. want to move instances to a new AWS Region, change to a new instance type, or sell capacity for projects that end before your Reserved Instance term expires).
- Spot Instances – Spot Instances allow customers to bid on unused Amazon EC2 capacity and run those instances for as long as their bid exceeds the current Spot Price. The Spot Price changes periodically based on supply and demand, and customers whose bids meet or exceed it gain access to the available Spot Instances. If you have flexibility in when your applications can run, Spot Instances can significantly lower your Amazon EC2 costs.
Getting Started with Amazon EC2
Getting Started with the AWS Management Console
Let’s get started with Amazon Elastic Compute Cloud (Amazon EC2) by using the AWS Management Console, a point-and-click web-based interface. Visit the Amazon Elastic Compute Cloud Documentation for a step-by-step tutorial on setting up and getting started with Amazon EC2.
Log into the AWS Management Console and set up your root account.
In the Amazon EC2 Dashboard, click “Launch Instance” to create and configure your virtual machine.
Step 3: Configure your Instance
In this wizard, you have the option to configure your instance features. Below are some guidelines on setting up your first instance.
- Choose an Amazon Machine Image (AMI): In step 1 of the wizard, we recommend the Amazon Linux AMI (free-tier eligible).
- Choose an instance type: In step 2 of the wizard, we recommend the t2.micro (free-tier eligible).
- Security Group: In step 6, you have the option to configure your virtual firewall.
- Launch Instance: In step 7, review your instance configuration and click Launch.
- Create a Key Pair: Select Create a new key pair and assign a name. The key pair file (.pem) will download automatically – save this in a safe place as we will later use this file to login to the instance. Finally, click Launch to complete the set up.
Note: It may take a few minutes to initialize your instance.
After you launch your instance, you can connect to it and use it the way that you’d use a computer sitting in front of you. To connect from the console, follow the below steps:
- Select the EC2 instance you created and click Connect.
- Select A Java SSH client directly from my browser. Ensure Java is installed and enabled.
- Enter the Private key path (example: C:\KeyPairs\my-key-pair.pem)
- Click Launch SSH Client
Note: You can also connect via SSH or PuTTY, click here to learn more.
Step 5: Terminate Instances
Amazon EC2 is free to start (learn more), but you should terminate your instances to prevent additional charges. The EC2 instance and the data associated will be deleted.
- Select the EC2 instance, click Actions, select Instance State, and then select Terminate.