Elastic Compute Cloud Introduction
Amazon Elastic Compute Cloud is a web service that provides resizable compute capacity in the cloud. Simply put EC2 provides virtual machines in the cloud. 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.
EC2 Pricing Options
- On-Demand: Allows you to pay a fixed rate by-the-hour (or by-the-second) with no commitment.
- Reserved: Provides you with a capacity reservation, and offers a significant discount on the hourly charge for an instance. These are 1 year or 3 year terms.
- Spot: Enables you to bid whatever price you want for instance capacity, providing for even greater savings if your applications have flixible start and end times.
- Dedicated Hosts: Physical EC2 server dedicated for your use. Dedicated hosts can help you reduce costs by allowing you to use existing server-bound software licenses.
EC2 Pricing Model Use Cases
On-Demand Instances
- Perfect for users that want the low cost and flexibility of Amazon EC2 witohout any up-front payment or long-term commitment.
- Good for applications with short term, spiky, or upredictable workloads that cannot be interrupted.
- Great for applications being developed or tested on Amazon EC2 for the first time.
Reserved Instances
- Applications with steady state or predictable usage.
- Applications that require reserved capacity.
- Users can make up-front payments to reduce their total computing costs even further.
- Standard Reserved Instances: Up to 75% off on-demand.
- Convertible Reserved Instances: Up to 54% off on-demand. Features the capability to change the attributes of the Reserved Instance as long as the exchange results in the creation of Reserved Instances of equal or greater value.
- Scheduled Reserved Instance are available to launch within the time window you reserve. This options allows you to match your capacity reservation to a predictable recurring schedule that only requires a fraction of a day, a week, or a month.
Spot Instances
- Applications that have flexible start and end times.
- Applications that are only feasible at very low compute prices.
- Users with an urgent need for large amounts of additional computing capacity.
Dedicated Hosts
- Useful for regulatory requirements that may not support multi-tenant virtualization.
- Great for licensing which does not support multi-tenancy or cloud deployments.
- Can be purchased on-demand (hourly).
- Can be purchased as reservation for up to 70% off the on-demand price.
EC2 Instance Types
Family | Specialty | Use Case |
---|---|---|
F1 | Field Programmable Gate Array | Genomics research, financial analytics, real-time video processing, big data, etc. |
I3 | High-Speed Storage | NoSQL, DBs, Data Warehousing, etc. |
G3 | Graphics Intensive | Video Encoding/3D Application Streaming |
H1 | High Disk Throughput | MapReduce-based workloads, distributed file systems such as HDFS and MapR-FS |
T2 | Lowest Cost, General Purpose | Web Servers/Small DBs |
D2 | Dense Storage | File Servers/Data Warehousing/Hadoop |
R4 | Memory Optimized | Memory Intensive Apps/DBs |
M5 | General Purpose | Application Servers |
C5 | Compute Optimized | CPU Intensive Apps/DBs |
P3 | Graphics/General Purpose GPU | Machine Learning, Bit Coin Mining, etc. |
X1 | Memory Optimized | SAP HANA/Apache Spark, etc. |
It is not necessary to know all of the details about the instance types for the Developer Associate exam; however, it is necessary to know the letters. An easy way to remember the letters is:
F-I-G-H-T-D-R-M-C-P-X (Fight-Dr-McPx; Imagine McScrooge with a bunch of pictures and the guy from fight club fighting him...)
EBS Introduction
Amazon Elastic Block Storage allows you to create storage volumes and attach them to EC2 instances. Once attached, you can create a file system on top of these volumes, run a database, or use them in any other way you would use a block device. Amazon EBS volumes are placed in a specific Availability Zone, where they are automatically replicated to protect you from failure of a single component (i.e. they exist across multiple physical drives).
Think of EBS as a disk in the cloud that you attach to your EC2 instance.
When installing Windows or Linux, there is a root device volume created by default on which the OS is installed. Additional volumes can be created on top of this.
EBS Volume Types
There are various different volume types for different use cases.
General Purpose SSD (GP2)
- General purpose, balances both price and performance.
- Ratio of 3 IOPS per GB with up to 10,000 IOPS and the ability to burst up to 3000 IOPS for extended periods of time for volumes at 3334 GB and above.
Provisioned IOPS SSD (I01)
- Designed for I/O intensive applications such as large relational or NoSQL databases.
- Use if you need more than 10,000 IOPS.
- Can provision up to 20,000 IOPS per volume.
Throughput Optimized HDD (ST1)
- Big data
- Data warehouses
- Log processing
- Cannot be a boot volume
Cold HDD (SC1)
- Lowest cost storage for infrequently accessed workloads
- File server
- Cannot be a boot volume
Magnetic (Standard)
- Lowest cost per gigabyte of all EBS volume types that is bootable. Magnetic volumes are ideal for workloads where data is accessed infrequently and applications where the lowest storage cost is important.