EC2 – 101 Part 1
https://www.udemy.com/aws-certified-solutions-architect-associate/learn/v4/t/lecture/2050662?start=0
Elastic Compute Cloud – This is the most important section of the course!
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity 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. – a.k.a. Virtual Machines in the cloud.
Amazon EC2 changes the economics of computing by allowing you to pay only for the capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios.
EC2 Pricing Calculator
Use this handy tool to calculate the costs of an Amazon environment.
http://calculator.s3.amazonaws.com/index.html
EC2 Pricing Options
- On Demand – allow you to pay a fixed rate by the hour with no commitment.
- Reserved – provide you with a capacity reservation, and offer a significant discount on the hourly charge for an instance. 1 or 3 year Terms
- Spot – enable you to bid whatever price you want for instance capacity providing for even greater savings if your applications have flexible start and end times. (Like playing the stock market, if the bid price is too low, the service will terminate)
- Dedicated Hosts – Physical EC2 server dedicated for your use. Dedicated Hosts can help you reduce costs by allowing you to use your existing server-bound software licenses.
On Demand
- Users that want the low cost and flexibility of EC2 without an up-front payment or long-term commitment.
- Applications have short term, spiky or unpredictable workloads that cannot be interrupted.
- Applications being developed or tested on EC2 for the first time.
Reserved
- Applications with steady state or predictable usage.
- Applications that require reserved capacity.
- Users able to make upfront payments to reduce their total computing costs even further.
Good example is a client that needs 2 reserved instances for day-to-day operations, but then adds ‘On Demand’ instances for Black Friday sales.
Spot
- Spot prices change depending on the region and even Availability Zones.
- When the Spot price matches your Bid price, you’ll be triggered into purchasing the resource. Once the Spot price exceeds the bid price, the EC2 instance will terminate.
- Once the instance terminates, Amazon will NOT charge for a partial hour of usage.
- If you terminate the instance yourself, you will be charge for any hour in which the instance ran.
- Good for applications that have flexible start and end times.
- Applications that are only feasible at very low compute prices.
- Users with urgent computing needs for large amounts of additional capacity.
Dedicated Hosts
- Useful for regulatory requirements that may not support multi-tenant virtualization. (HIPAA?)
- Great for licensing which does not support multi-tenancy or cloud deployments.
- Can be purchased On-Demand (hourly)
- If purchased as a reservation for several months/years, client can save up to 70% off the On Demand pricing!
EC2 Instance Types
| Family | Specialty | Use Case |
|---|---|---|
| D2 (Density) | Dense Storage | Fileservers / Data Warehousing / Hadoop |
| R4 (RAM) | Memory Optimized | Memory Intensive Apps / DBs |
| M4 (MAIN) | General Purpose | Application Servers |
| C4 (Compute) | Compute Optimized | CPU Intensive Apps / DBs |
| G2 (Graphics) | Graphics Intensive | Video Encoding / 3D Application Streaming |
| I2 (IOPs) | High Speed Storage | NoSQL DBs, Data Warehousing, etc. |
| F1 (Field or FPGA) | Field Programmable Gate Array | Hardware acceleration for your code |
| T2 (Typical) | Lowest Cost, General Purpose | Web Servers / Small DBs |
| P2 (Pixel?) | Graphics / General Purpose GPU | Machine Learning / Bit Coin Mining etc. |
| X1 (Xtream RAM) | Memory Optimized | SAP HANA / Apache Spark, etc. |
The Letter designates the type of instance, the number designates the ‘generation’.
EC2 – 101 Part 2
https://www.udemy.com/aws-certified-solutions-architect-associate/learn/v4/t/lecture/6319440?start=0
What is EBS?
Amazon EBS (Elastic Block Storage) allows you to create storage volumes and attach them to Amazon 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 the are automatically replicated to protect you from the failure of a single component (Nodes). (These are NOT automatically replicated to different AZ!)
EBS Volume Types
- SSD
- 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 under 1 GB
- Volumes range from 1GB – 16TB
- Provisioned IOPS SSD (IO1 “io1”)
- 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.
- General Purpose SSD (GP2)
- HDD
- Throughput Optimized HDD (ST1) a.k.a. High Throughput
- Big Data, Data Warehouses, Log processing (Sequential data)
- Cannot be a boot volume
- Cold HDD (SC1) a.k.a. Cold Storage
- Lowest Cost Storage for infrequently accessed workloads
- Good for a file server where files are not constantly accessed, or maybe not accessed at all!
- Cannot be a boot volume
- Magnetic (Standard)
- Lowest cost per gigabyte of all EBS volumes types that is bootable. Magnetic Volumes are ideal for workloads where data is accessed infrequently and applications where the lowest storage cost is important.
- Virtually the same as Cold Storage (SC1) but this IS bootable!
- Throughput Optimized HDD (ST1) a.k.a. High Throughput
Exam Tips
- Know the difference between:
- On Demand
- Spot
- If the user terminates the instance, they pay for the remaining hour
- If AWS terminates it because the spot price exceeds the bid price, the hour the instance is terminated in is free.
- Reserved
- Dedicated Hosts
- EBS Consists of:
- SSD, General Purpose (GP2) – Up to 10,000 IOPS
- SSD, Provisioned IOPS (io1) – More than 10,000 IOPS (Up to 20,000 IOPS)
- HDD, Throughput Optimized (ST1) – Big data, sequential file structures
- HDD, Cold Storage (SC1) – Low cost, infrequently accessed
- HDD, Magnetic (Standard) – Same as SC1, but can be used as a boot volume.
- YOU CANNOT mount an EBS volume to multiple EC2 instances at the same time!!!
- Instead, use EFS!
- Dr McGift PX
- Know what each letter stands for!
