Amazon EC2 instances are the fundamental building block for your computing needs in the AWS cloud. You can think of instances as virtual servers that can run applications. Instances are created from an Amazon Machine Image (AMI) and choosing an appropriate instance type. An AMI is a template that contains a software configuration, including an operating system, which defines your operating environment. You can select an AMI provided by AWS, our user community, or on the AWS Marketplace. You can also create and optionally share your own AMIs. A single AMI can be used to launch one or thousands of instances.
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose
the appropriate mix of resources for your applications. Each instance type includes one or more instance sizes, allowing you to scale your resources to the requirements of your target workload. For the best experience, you should launch on instance types that are appropriate for your applications. You have the flexibility to choose the combination of instance types most appropriate for your application today, and then choose a different instance size as your business and application needs change. To make it easier for you to select the best option for your applications, Amazon EC2 instance types are grouped together into families based on target application profiles. Below is a quick guide to help you think about choosing the right
Amazon EC2 instances are available in the following families:
This family includes the M1 and M3 instance types, and provides a balance of compute, memory, and network resources, and it is a good choice for many applications. General-purpose instances are recommended for small and mid-size databases, data processing tasks that require additional memory, caching fleets, and for running backend servers for SAP, Microsoft SharePoint, and other enterprise applications. M3 instances are the newest generation of general-purpose instances, and give you the option of a larger number of virtual CPUs (vCPUs) that provide higher performance. M3 instances are recommended if you are seeking general purpose instances with demanding CPU requirements. M1 instances are the original family of general-purpose instances and provide the lowest cost options for running your applications. M1 instances are a great option if you are seeking moderate CPU performance, and a lower overall price.
This family includes the C1 and CC2 instance types and is optimized for applications that benefit from high compute power. Compute-optimized instances have a higher ratio of vCPUs to memory than other families and the lowest cost per vCPU among all Amazon EC2 instance types. We recommend compute-optimized instances for running CPU-bound scale out applications. Examples of such applications include high traffic front end fleets, on-demand batch processing, distributed analytics, web servers, batch processing, and high performance science and engineering applications. CC2 instances are the latest generation of compute-optimized instances and provide the lowest cost CPU power relative to other instance families. CC2 instances also provide a number of advanced capabilities: Intel Xeon E5-2670 processors; high core count (32 vCPUs); support for cluster networking. These capabilities allow you to cluster CC2 instances into high performance clusters capable of delivering hundreds of teraflops of floating point performance. C1 instances are the first generation of compute-optimized instances; they are available in smaller sizes and useful for massively scaled-out applications. For example, customers have launched distributed clusters of thousands of c1.xlarge instances to encode videos or screen compound libraries to design new drugs.
This family includes the M2 and CR1 instance types and is optimized for memory-intensive applications. Memory-optimized instances have the lowest cost per GiB of RAM among Amazon EC2 instance types. We recommend memory-optimized instances for many database applications, for memcached and other distributed caches, and larger deployments of enterprise applications like SAP and Microsoft SharePoint. CR1 instances are the latest generation of memory-optimized instances and provide even more memory (244 GiB), run on faster CPUs (Intel Xeon E5-2670 with NUMA support) compared to M2 instances, and support cluster networking for bandwidth intensive applications. M2 instances are available in smaller sizes, and are an excellent option for many memory-bound applications.
This family includes the HI1 and HS1 instance types, and provides you with direct-attached
storage options optimized for applications with specific disk I/O
and storage capacity requirements. Currently, there are two types of storage-optimized
instances. HI1 instances provide very fast SSD-backed instance
storage capable of supporting over 120,000 random read IOPS, and are optimized for
very high random I/O performance and low cost per IOPS. HS1 instances are optimized
for very high storage density, low storage cost, and high sequential I/O performance.
We recommend using HI1 instances for NoSQL databases like Cassandra and MongoDB which benefit
from very high random I/O performance and the low request latency of direct-attached
SSDs. HI1 instances are also an excellent choice for transactional systems that
can manage their own resiliency.
HS1 instances provide you with 48 TB of storage capacity across 24 hard disk drives, high network performance, and offer throughput performance of up to 2.6 GBps. We recommend HS1 instances for customers running large-scale data warehouses or parallel file systems. For instance, if you are running an always-on Hadoop cluster with 100s of terabytes of data, you should choose HS1 instances.
Micro instances are a very low-cost instance option, providing a small amount of CPU resources. Micro instances may opportunistically increase CPU capacity in short bursts when additional cycles are available. They are well suited for lower throughput applications and websites that require additional compute cycles periodically, but are not appropriate for applications that require sustained CPU performance.
This family includes the CG1 instances and allows you to take advantage of the parallel performance of NVidia Tesla GPUs using the CUDA and OpenCL programming models for GPGPU computing. GPU instances also provide high CPU capabilities and support cluster networking.
We recommend that you select the instance type that is most appropriate for your workload profile and scale, and then change your instance type if your application's requirements change. In all cases, we strongly recommend application profiling and load testing. The availability of multiple instance types, combined with features like EBS-optimization and cluster networking allow applications to be optimized for increased performance, improved application resilience, and lower costs. In particular, you should evaluate the most important performance metrics for your application. For applications that benefit from a low
cost per CPU, we recommend choosing compute-optimized instances (C1 or CC2 instances). For applications that require the lowest cost per GiB of memory, we recommend choosing memory-optimized instances (M2 or CR1 instances). Additionally, we recommend that if you are running a database, you should choose instances that support EBS-optimization or instances that support cluster networking. For applications with high inter-node network requirements, you should choose instances that support cluster networking. Micro instances provide short-lived CPU resources opportunistically and are not recommended for applications that require sustained CPU performance.
For a complete list of instance families, sizes, and specifications of Amazon EC2 instance types please see Amazon EC2 Instance Details
Amazon EC2 instances provide a number of additional features to help you deploy, manage, and scale your applications.
Amazon EC2 allows you to choose between multiple storage options based on your requirements. Amazon EBS is a durable, block-level storage volume that you can attach to a single, running Amazon EC2 instance. You can use Amazon EBS as a primary storage device for data that requires frequent and granular updates. For example, Amazon EBS is the recommended storage option when you run a database on Amazon EC2. Amazon EBS volumes persist independently from the running life of an Amazon EC2 instance. Once a volume is attached to an instance you can use it like any other physical hard drive. Amazon EBS provides two volume types: Standard volumes and Provisioned IOPS volumes. They differ in performance characteristics and price, allowing you to tailor your storage performance and cost to the needs of your applications.
Standard volumes offer storage for applications with moderate or bursty I/O requirements. Standard volumes deliver approximately 100 IOPS on average with a best effort ability to burst to hundreds of IOPS. Standard volumes are also well suited for use as boot volumes, where the burst capability provides fast instance start-up times.
Provisioned IOPS volumes are designed to deliver predictable, high performance for I/O intensive workloads such as databases. With Provisioned IOPS, you specify an IOPS rate when creating a volume, and then Amazon EBS provisions that rate for the lifetime of the volume. Amazon EBS currently supports up to 4000 IOPS per Provisioned IOPS volume. You can stripe multiple volumes together to deliver thousands of IOPS per Amazon EC2 instance to your application.
Many Amazon EC2 instances can also include storage from disks that are physically attached to the host computer. This disk storage is referred to as instance store. Instance store provides temporary block-level storage for Amazon EC2 instances. The data on an instance store volume persists only during the life of the associated Amazon EC2 instance.
In addition to block level storage via Amazon EBS or instance store, you can also use Amazon S3 for highly durable, highly available object storage. Learn more about Amazon EC2 storage options from the Amazon EC2 documentation.
For a low, additional, hourly fee, you can launch selected Amazon EC2 instances types as EBS-optimized instances. EBS-optimized instances deliver dedicated throughput between Amazon EC2 and Amazon EBS, with options for 500 Mbps and 1000 Mbps depending on the instance type used. We recommend using Provisioned IOPS volumes with EBS-optimized instances or instances that support cluster networking for applications with high storage I/O requirements.
CC2, CR1, CG1, HI1, and HS1 instances support cluster networking. Instances launched into a common cluster placement group are placed into a logical cluster that provides high-bandwidth, low-latency networking between all instances in the cluster. Cluster networking is ideal for high performance analytics systems and many science and engineering applications, especially those using the MPI library standard for parallel programming.
Dedicated Instances are Amazon EC2 instances that run on single-tenant hardware dedicated to a single customer. They are ideal for workloads where corporate policies or industry regulations require that your EC2 instances be physically isolated at the host hardware level from instances that belong to other customers. Dedicated Instances let you take full advantage of the benefits of the AWS cloud – on-demand elastic provisioning, pay only for what you use, all while ensuring that your Amazon EC2 compute instances are isolated at the hardware level.
Amazon EC2 allows you to provision a variety of instances types, which provide different combinations of CPU, memory, disk, and networking. Launching new instances and running tests in parallel is easy, and we recommend measuring the performance of applications to identify appropriate instance types and validate application architecture. We also recommend rigorous load/scale testing to ensure that your applications can scale as you intend.
Amazon EC2 provides you with a large number of options across ten different instance types, each with one or more size options, organized into six distinct instance families optimized for different types of applications. We recommend that you assess the requirements of your applications and select the appropriate instance family as a starting point for application performance testing. You should start evaluating the performance of your applications by (a) identifying how your application needs compare to different instance families (e.g. is the application compute-bound, memory-bound, etc.?), and (b) sizing your workload to identify the appropriate instance size. There is no substitute for measuring the performance of your full application since application performance can be impacted by the underlying infrastructure or by software and architectural limitations. We recommend application-level testing, including the use of application profiling and load testing tools and services.