AWS/EC2
From Christoph's Personal Wiki
Revision as of 23:40, 30 January 2017 by Christoph (Talk | contribs) (Created page with "==Elastic Block Storage (EBS)== : SEE: [https://aws.amazon.com/ebs/faqs/ Amazon EBS FAQs] * EBS Volume types (see: [http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolu...")
Elastic Block Storage (EBS)
- SEE: Amazon EBS FAQs
- EBS Volume types (see: for details)
- General purpose SSD (
gp2
): General purpose SSD volume that balances price and performance for a wide variety of transactional workloads- up to 10,000 IOPS
- Provisioned IOPS SSD (
io1
): Highest-performance SSD volume designed for mission-critical applications- more than 10,000 IOPS or 160 MiB/s of throughput per volume
- Throughput Optimized HDD (
st1
): Low cost HDD volume designed for frequently accessed, throughput-intensive workloads - Cold HDD (
sc1
): Lowest cost HDD volume designed for less frequently access workloads - Magnetic: infrequently accessed storage
- General purpose SSD (
NOTE: One can not mount 1 EBS volume to multiple EC2 instances; use EFS instead.
In order to enable encryption at rest using EC2 and Elastic Block Store, one needs to configure encryption when creating the EBS volume.
Elastic Compute Cloud (EC2)
- SEE: Amazon EC2 FAQs
- EC2 provision types:
- On-Demand
- Reserved
- Amazon EC2 Reserved Instances allow you to reserve Amazon EC2 computing capacity for 1 or 3 years, in exchange for a significant discount (up to 75%) compared to On-Demand instance pricing.
- Spot
- Amazon EC2 Spot instances allow you to bid on spare Amazon EC2 computing capacity. Since Spot instances are often available at a discount compared to On-Demand pricing, you can significantly reduce the cost of running your applications, grow your application's compute capacity and throughput for the same budget, and enable new types of cloud computing applications.
- Example use cases: genomics, drug companies, etc.
- If you terminate, you pay for the hour the instance was terminated
- If Amazon terminates it, you do not pay for the hour the instance was terminated
- EC2 Spot prices
- EC2 Instance Types:
- D for Density
- I for IOPS
- R for RAM
- T general purpose (think T2 Micro)
- M for Main choice (for general purpose apps)
- C for Compute
- G for Graphics
- mnemonic:
DIRTMCG
$ curl http://169.254.169.254/latest/meta-data/public-ipv4 # returns the EC2 instance's public IPv4
NOTE: If one makes an Amazon Machine Image (AMI) public, this AMI is not immediately available across all regions, by default.
With EC2 you can have 2 types of storage: EBS storage and Instance Store. EBS is persistent and if an EC2 instance is stopped with an EBS volume attached, there will be no data lost. Instance Store is ephemeral and if the EC2 instance is stopped, all data will be lost.