AWS EC2 Wiki – All you need to know about EC2


EC2

Elastic Compute Cloud (EC2) EC2 is the product name of the virtual machine IaaS Instance Reservation By default, all instances requested are On-Demand, however if instances are reserved for a period of time then there can be significant discounts in consumption.

RESERVED – Reserved instances is where your organization would commit to usage for a given time period (i.e. 1-3 years). Discounts can be significant depending on commitment type.

ON-DEMAND – On-Demand instances is where your organization would have no commitment, can start or stop at any time, and pay a simple hourly rate.

SPOT – Similar to On-demand, however your organization will have to “bid” for instances in the AWS market place. Your organization’s instances will keep on running until you stop the instance or the current spot price exceeds your organization’s bid price.

 

Elastic Block Storage (EBS)

EBS is the product name of the classic block storage service attached to EC2 instances, which traditional operating systems can lay a file system and use. EC2 instances utilize shared bandwidth network and storage operations. For dedicated bandwidth for storage I/O, select an EC2 that is EBS-Optimized.

EBS Snapshots

EBS snapshots are a point-in- time compact copy of data in an EBS volume, which can be access instantaneously, shared, or copied across regions

 

EC2 Regions

Region Code

Region Names

us-east-1US East (N. Virginia) (5 AZs)
us-west-2US West (Oregon) (3 AZs)
us-west-1US West (N. California) (3 AZs)
eu-west-1EU (Ireland) (3 Azs)
eu-central-1EU (Frankfurt) (2 AZs)
ap-southeast-1Asia Pacific (Singapore) (2 AZs)
ap-northeast-1Asia Pacific (Tokyo) (3 AZs)
ap-southeast-2Asia Pacific (Sydney) (3 AZs)
ap-northeast-2Asia Pacific (Seoul) (2 AZs)
ap-south-1Asia Pacific (Mumbai) (2 AZs)
sa-east-1South America (São Paulo) (3 AZs)
  
us-gov-west-1AWS GOVCLOUD (2 AZs)

 

 

EC2 Different pricing categories

 

EC2_Pricing

 

Current and Previous generation Instance Types

Instance FamilyCurrent Generation Instance TypesPrevious Generation Instance Types
General purposet2.nano | t2.micro | t2.small | t2.medium | t2.large | m4.large |m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge | m3.medium |m3.large | m3.xlarge | m3.2xlargem1.small | m1.medium | m1.large | m1.xlarge
Compute optimizedc4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge |c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlargec1.medium | c1.xlarge | cc2.8xlarge
Memory optimizedr3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge |x1.32xlargem2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge
Storage optimizedi2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | d2.xlarge |d2.2xlarge | d2.4xlarge | d2.8xlargehi1.4xlarge | hs1.8xlarge
GPU instancesg2.2xlarge | g2.8xlargecg1.4xlarge
Micro instances t1.micro

 

 

Hardware Specifications

Instance FamilyHardware Specification
General purpose (T2)

High Frequency Intel Xeon Processors with Turbo up to 3.3GHz

Burstable CPU, governed by CPU Credits, and consistent baseline performance

General purpose (M4)

2.4 GHz Intel Xeon® E5-2676 v3 (Haswell) processors

EBS-optimized by default at no additional cost

Support for Enhanced Networking

General purpose (M3)

High Frequency Intel Xeon E5-2670 v2 (Ivy Bridge) Processors*

SSD-based instance storage for fast I/O performance

Compute optimized (C4)

High frequency Intel Xeon E5-2666 v3 (Haswell) processors optimized specifically for EC2

EBS-optimized by default and at no additional cost

Ability to control processor C-state and P-state configuration on the c4.8xlarge instance type

Compute optimized (C3)

High Frequency Intel Xeon E5-2680 v2 (Ivy Bridge) Processors

Support for Enhanced Networking

Support for clustering

Memory optimized (X1)

High Frequency Intel Xeon E7-8880 v3 (Haswell) Processors

Lowest price per GiB of RAM

1,952 GiB of DDR4-based instance memory

SSD Storage and EBS-optimized by default and at no additional cost

Memory optimized (R3)

High Frequency Intel Xeon E5-2670 v2 (Ivy Bridge) Processors

SSD Storage

Storage optimized (I2)

High Frequency Intel Xeon E5-2670 v2 (Ivy Bridge) Processors

SSD Storage & Support for TRIM

Storage optimized (D2)

High-frequency Intel Xeon E5-2676v3 (Haswell) processors

HDD storage

Consistent high performance at launch time

High disk throughput

GPU instances

High Frequency Intel Xeon E5-2670 (Sandy Bridge) Processors

High-performance NVIDIA GPUs, each with 1,536 CUDA cores and 4GB of video memory

Each GPU features an on-board hardware video encoder designed to support up to eight real-time HD video streams (720p@30fps) or up to four real-time full HD video streams (1080p@30fps)

 

GENERAL PURPOSE – General purpose is a hybrid storage offering that utilizes traditional HDDs backed by SSD for performance. All new EBS storage provisioned with EC2 are general purpose by default.

 

PIOPS – PIOPS is a pure SSD offering where your organization can pay for specific IOPS levels and latency.

 

MAGNETIC – Magnetic is the legacy EBS offering that is comprised of traditional HDDs only, hence the name “magnetic”. Use of Magnetic EBS volumes should be discouraged.

 

Instance Store

An instance store provides temporary block-level storage for your instance. This storage is located on disks that are physically attached to the host computer. Instance store is ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content, or for data that is replicated across a fleet of instances, such as a load-balanced pool of web servers. While an instance store is dedicated to a particular instance, the disk subsystem is shared among instances on a host computer. 

You can specify instance store volumes for an instance only when you launch it. The data in an instance store persists only during the lifetime of its associated instance. If an instance reboots (intentionally or unintentionally), data in the instance store persists. However, data in the instance store is lost under the following circumstances:

  • The underlying disk drive fails
  • The instance stops
  • The instance terminates

Therefore, do not rely on instance store for valuable, long-term data. Instead, you can build a degree of redundancy (for example, RAID 1/5/6), or use a file system (for example, HDFS and MapR-FS) that supports redundancy and fault tolerance. You can also back up data periodically to more durable data storage solutions such as Amazon S3 or Amazon EBS.

Some instance types use solid state drives (SSD) to deliver very high random I/O performance. This is a good option when you need storage with very low latency, but you don’t need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures.

 

EBS backed store

You can attach an EBS volumes to one of your instances that is in the same Availability Zone as the volume.

EBS backed instances can be set so that they cannot be (accidentally) terminated through the API.

EBS backed instances can be stopped when you’re not using them and resumed when you need them again (like pausing a Virtual PC). EBS backed instances don’t lose their instance storage when they crash (not a requirement for all users, but makes recovery much faster)

You can dynamically resize EBS instance storage. You can transfer the EBS instance storage to a brand new instance (useful if the hardware at Amazon you were running on gets flaky or dies, which does happen from time to time)

It is faster to launch an EBS backed instance because the image does not have to be fetched from S3.

 

EBS-Optimized Instances

For an additional, low, hourly fee, customers can launch selected Amazon EC2 instances types as EBS-optimized instances. For C4, M4, and D2 instances, this feature is enabled by default at no additional cost. EBS-optimized instances enable EC2 instances to fully use the IOPS provisioned on an EBS volume. EBS-optimized instances deliver dedicated throughput between Amazon EC2 and Amazon EBS, with options between 500 and 4,000 Megabits per second (Mbps) depending on the instance type used.

 

Enhanced Networking

Enhanced Networking enables you to get significantly higher packet per second (PPS) performance, lower network jitter and lower latencies. This feature uses a new network virtualization stack that provides higher I/O performance and lower CPU utilization compared to traditional implementations. In order to take advantage of Enhanced Networking, you should launch an HVM AMI in VPC, and install the appropriate driver. Enhanced Networking is currently supported in R3, C3, C4, M4, D2, and I2 instances.

 

Instance Types:

Instance TypevCPUMemory (GiB)Instance Storage (GB)Networking PerformancePhysical ProcessorClock Speed (GHz)Intel AVXIntel AVX2Intel TurboEBS OPT
Enhanced Networking
t2.nano10.5EBS OnlyLowIntel Xeon familyup to 3.3YesYes
t2.micro11EBS OnlyLow to ModerateIntel Xeon familyUp to 3.3YesYes
t2.small12EBS OnlyLow to ModerateIntel Xeon familyUp to 3.3YesYes
t2.medium24EBS OnlyLow to ModerateIntel Xeon familyUp to 3.3YesYes
t2.large28EBS OnlyLow to ModerateIntel Xeon familyUp to 3.0YesYes
m4.large28EBS OnlyModerateIntel Xeon E5-2676 v32.4YesYesYesYesYes
m4.xlarge416EBS OnlyHighIntel Xeon E5-2676 v32.4YesYesYesYesYes
m4.2xlarge832EBS OnlyHighIntel Xeon E5-2676 v32.4YesYesYesYesYes
m4.4xlarge1664EBS OnlyHighIntel Xeon E5-2676 v32.4YesYesYesYesYes
m4.10xlarge40160EBS Only10 GigabitIntel Xeon E5-2676 v32.4YesYesYesYesYes
m3.medium13.751 x 4 SSDModerateIntel Xeon E5-2670 v2*2.5YesYes
m3.large27.51 x 32 SSDModerateIntel Xeon E5-2670 v2*2.5YesYes
m3.xlarge4152 x 40 SSDHighIntel Xeon E5-2670 v2*2.5YesYesYes
m3.2xlarge8302 x 80 SSDHighIntel Xeon E5-2670 v2*2.5YesYesYes
c4.large23.75EBS OnlyModerateIntel Xeon E5-2666 v32.9YesYesYesYesYes
c4.xlarge47.5EBS OnlyHighIntel Xeon E5-2666 v32.9YesYesYesYesYes
c4.2xlarge815EBS OnlyHighIntel Xeon E5-2666 v32.9YesYesYesYesYes
c4.4xlarge1630EBS OnlyHighIntel Xeon E5-2666 v32.9YesYesYesYesYes
c4.8xlarge3660EBS Only10 GigabitIntel Xeon E5-2666 v32.9YesYesYesYesYes
c3.large23.752 x 16 SSDModerateIntel Xeon E5-2680 v22.8YesYesYes
c3.xlarge47.52 x 40 SSDModerateIntel Xeon E5-2680 v22.8YesYesYesYes
c3.2xlarge8152 x 80 SSDHighIntel Xeon E5-2680 v22.8YesYesYesYes
c3.4xlarge16302 x 160 SSDHighIntel Xeon E5-2680 v22.8YesYesYesYes
c3.8xlarge32602 x 320 SSD10 GigabitIntel Xeon E5-2680 v22.8YesYesYes
g2.2xlarge8151 x 60 SSDHighIntel Xeon  E5-26702.6YesYesYes
g2.8xlarge32602 x 120 SSD10 GigabitIntel Xeon E5-26702.6YesYes  –– 
x1.32xlarge1281,9522 x 1,920 SSD20 GigabitIntel Xeon E7-8880 v32.3YesYesYesYesYes
r3.large215.251 x 32 SSDModerateIntel Xeon E5-2670 v22.5YesYesYes
r3.xlarge430.51 x 80 SSDModerateIntel Xeon E5-2670 v22.5YesYesYesYes
r3.2xlarge8611 x 160 SSDHighIntel Xeon E5-2670 v22.5YesYesYesYes
r3.4xlarge161221 x 320 SSDHighIntel Xeon E5-2670 v22.5YesYesYesYes
r3.8xlarge322442 x 320 SSD10 GigabitIntel Xeon E5-2670 v22.5YesYesYes
i2.xlarge430.51 x 800 SSDModerateIntel Xeon E5-2670 v22.5YesYesYesYes
i2.2xlarge8612 x 800 SSDHighIntel Xeon E5-2670 v22.5YesYesYesYes
i2.4xlarge161224 x 800 SSDHighIntel Xeon E5-2670 v22.5YesYesYesYes
i2.8xlarge322448 x 800 SSD10 GigabitIntel Xeon E5-2670 v22.5YesYesYes
d2.xlarge430.53 x 2000ModerateIntel Xeon E5-2676 v32.4YesYesYesYesYes
d2.2xlarge8616 x 2000HighIntel Xeon E5-2676 v32.4YesYesYesYesYes
d2.4xlarge1612212 x 2000HighIntel Xeon E5-2676 v32.4YesYesYesYesYes
d2.8xlarge3624424 x 200010 GigabitIntel Xeon E5-2676 v32.4YesYesYesYesYes

 

 

EBS Volume Types

 Solid State Drives (SSD)Hard Disk Drives (HDD)
Volume TypeEBS Provisioned IOPS SSD (io1)EBS General Purpose SSD (gp2)*Throughput Optimized HDD (st1)Cold HDD (sc1)
Short DescriptionHighest performance SSD volume designed for latency-sensitive transactional workloadsGeneral Purpose SSD volume that balances price performance for a wide variety of transactional workloadsLow cost HDD volume designed for frequently accessed, throughput intensive workloadsLowest cost HDD volume designed for less frequently accessed workloads
Volume Size4 GB – 16 TB1 GB – 16 TB500 GB – 16 TB500 GB – 16 TB
Max IOPS**/Volume20,00010,000500250
Max Throughput/Volume320 MB/s160 MB/s500 MB/s250 MB/s
Max IOPS/Instance48,00048,00048,00048,000
Max Throughput/Instance800 MB/s800 MB/s800 MB/s800 MB/s
Dominant Performance AttributeIOPSIOPSMB/sMB/s

 

Authors

Aron Jose Francis AmaldossAron Jose Francis Amaldoss

Solution Architect - IaaS
Linkedin: https://in.linkedin.com/in/aron-jose-francis-a-a137b19b

DevopsIdeasDevopsIdeas

Established in 2016, a community where system admins and devops practitioners can find useful in-depth articles, latest trends and technologies, interview ideas, best practices and much more on Devops

Aron Jose Francis Amaldoss

Solution Architect - IaaS Linkedin: https://in.linkedin.com/in/aron-jose-francis-a-a137b19b

Any Udemy course for $9.99 REDEEM OFFER
Any Udemy course for $9.99 REDEEM OFFER