EC2 Flashcards
What is EC2?
Elastic Compute Cloud, a web service that provide resizable compute capacity in the cloud. You only pay for the capacity you use
EC2 Options
On Demand
Reserved
Spot
On Demand Pricing Structure
fixed rate by the hour with no commitment
Reserved Pricing Structure
you get a capacity reservation with a significant discount on hourly charge. 1 or 3 year terms
Spot
enables on to bid whatever price you want for instance capacity
On Demand uses cases include
Users wanting low cost and flexibility without upfront payment or long-term commitment
App with short-term, spiky or unpredictable workloads that cannot be interrupted
Apps being developed/tested
Reserved uses cases include
Apps with steady state or predictable usage
Apps that require reserved capacity
Users able to make upfront payment to reduce their total computing costs
Spot
Apps that have flexible start and end times
Apps that are only feasible at very low compute prices
Users with urgent computing needs for large amounts of additional capacity
EC2 instance types include:
T2, M3/4, C3/4, R3, G2, I2, D2 (T MaC RiGID)
What is EBS?
Elastic Block Storage. It is basically a disk in the cloud that can be attached to only one EC2 instance.
EBS volume types include:
General purpose SSD (GP2)
Provisioned IOPS SSD (IO1)
Magnetic (Standard)
General purpose SSD (GP2)
99.999% availability
Ratio of 3 IOPS per GB with up to 10,000 IOPS
Ability to burst up to 3000 IOPS for short periods for volumes under 1Gib
IOPS
Input/Output per second
Provisioned IOPS SSD (IO1)
Designed for I/O intensive applications. Use if you need more than 10,000 IOPS
Magnetic
Traditional disk storage - ideal for infrequently accessed data and for low-cost storage.
True or False. Termination protection for EC2 instances are turned on by default.
False. It is on turned on.
What is the default action for an EBS-backed instance when the instance is terminated?
The root EBS volume is deleted.
True or False. Root volumes cannot be encypted by default.
True, you need a third party tool to encrypt the root volume. However, additional volumes can be encrypted.
What is a volume and where do they exist?
a virtual hard disk on EBS
What is a snapshot and where do they exist?
Snapshots are point in time copies of volumes and exist on S3
Snapshots are incremental meaning…
That only the blocks that have changed since the last snapshot are moved to S3.
Can snapshots be shared?
Yes, only if they are unencrypted.
Under what conditions should you take a snapshot of a root device?
After stopping the instance.
How can a snapshot of a RAID array be taken?
By either:
- Freezing the file system
- Unmounting the RAID array
- Shutting down the associated EC2 instance
What is an AMI?
Amazon Machine Image is a template which provides the information required to launch a virtual server in the cloud.
What composes the AMI?
- A template for the root volume for the instance
- Launch permissions that control which AWS accounts can use the AMI to launch instances
- A block device mapping that specifies the volumes to attach to the instance when it’s launched.
All AMIs are categorized as either backed by…
Amazon EBS or instance store
For EBS volumes, the root device for an instance launched from the AMI is…
An Amazon EBS volume created from an Amazon EBS snapshot.
For instance store volumes, the root device for an instance launched from the AMI is..
An instance store volume created from a template stored in Amazon S3
What another name for instance store volumes?
Ephemeral storage
Can instance store volumes be stopped?
No. If the underlying host fails you lose all data
What happens to the EBS and instance store root volumes upon termination?
By default, the root volume will be terminated; however with EBS volumes, you can tell AWS to keep the root device volume
True or false. Elastic Load Balancers have their own IP address.
False. They have their own DNS name. They are never given an IP address
In Cloud Watch, what are the standard and detailed monitoring times?
5 minutes for standard, 1 minute for detailed
What are some features of cloudwatch?
Dashboards - see what’s happening
Alarms - notify you of threshold hits
Events - help you to respond to state changes
Logging
Can you assign a role to an existing EC2 instance?
No. Only when the instance is being provisioned.
What some of the advantages of using roles to access and EC2 instance?
- more secure than storing the access key and secret access key on individual EC2 instances
- roles are universal which means you can use them in any region
- roles are easier to manage
What is the metadata URL?
http://169.254.169.254/latest/meta-data/