Amazon Elastic Compute Cloud (EC2) service allow us to create resizable server instances on the cloud. AWS EC2 service can create, remove, scale your instance capacity in a minute as your requirement changes.
AWS EC2 instance types pricing model
On Demand: Pay fixed hourly rates with no commitment. You can create, scale and delete your instance any time.
Reserved: You have to fixed the capacity for certain time period like 1 or 3 years terms commitment. You can’t remove instance during these time period. Compare to On Demand it’s provide significant discount on hourly charges.
Sport Instances: AWS data-centers always have some unused resources which you can bid on. You bid for the instance capacity and time period and if you bid price is equal or greater then the spot price you will purchase that spot instance. If someone bid higher then your bid pricing you will get an notice from AWS and it will be removed. You can look here for bid pricing statistics based on region and AZ
How to select instance type
On Demand: Applications with no commitment, unpredictable work load, being developed of tested on AWS, Adding more capacity for your application for certain time.
Reserved: You know application behavior and it’s capacity. Long term applications, want to reducing cost.
Spot: Large computing capacity for period of time, Low computing price of period of time, Application which have flexible start and end time.
Note: If you terminate Spot instance you will pay partial hour charge and if AWS terminate they will.
EC2 instance family based on capacity
|T2||General Purpose||Low Computing for static website and small applications|
|M3 & M4||General Purpose||General purpose applications|
|C3 & C4||Compute Optimized||Compute Intense applications|
|R3||Memory Optimized||Memory intense applications, Web server|
|G2||Graphic or GPU Optimized||Video Processing and encoding, 3D Applications, Machine Learning|
|I2||High Speed Storage||High Speed IO intense application, NoSQL|
|D2||Dense Storage||Best for file servers|
Elastic Block Storage (EBS)
Amezon Elastic Block Storage is a Block device for EC2 instances. It’s like an HDD attached to your System. You can install OS on EBS volume, can add additional EBS volume on Your EC2 instances.
EBS volumes type
General purpose SSD: 99.99% Availability and Upto 10000 IOPS
Provisioned IOPS SSD: More then 10000 IOPS. For IO intensive applications.
Magnetic: Lowest storage cost. Low IOPS. Best for File Storage.