EC2 Flashcards
What are the different EC2 pricing models?
- On-Demand - allows paying fixed rate by the hour (or even second)
- Reserved - provides you with a capacity reservation and offers a significant discount to the hourly charge (contract terms are 1-3 years)
- SPot - enables you to bid whatever price you want for instance capacity, providing even greater savings if your applications have flexible start and end times
- Dedicated Hosts - physical ec2 instances dedicated to you
What is on demand EC2 useful for?
- Users that want the low cost and flexibility of ec2 without any up-front payment tor long-term commitment
- application with short term, spiky, or unpredictable workload that cannot be interrupted
- applications that are being developed or tested on ec2 for the first time
What is reserved pricing useful for?
- applications with steady state or predictable usage
- apps that require reserved capacity
- users able to make upfront payments to reduce their total computing costs even further
What is spot pricing useful for?
- 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
What are dedicated hosts useful for?
- 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 hourly (on-demand)
- can be purchased as reservation for up to 70% off on-demand price
What is the mnemonic for all the EC2 instances? Not needed for the test, but helpful to know
F - for FPGA
I - for IOPS
G - graphics
H - high disk throughput
T - cheap general purpose, think T2 micro
D - for density
R - for RAM
M - main choice for general-purpose apps
C - for compute
P - graphics (think pics)
X - extreme memory
Z - extreme memory AND CPU
A-arm based workloads
U - bare metal
True or False. If you turn off a spot instance you will not get charged.
False. You will get charged for that run. You will not get charged if AWS turns off the instance.
How many different types of hard drives can the root volume launch on? List them.
2
- Magnetic
- SSD (General, Provisioned)
What are security groups?
Virtual firewall, how you direct various types of traffic.
Can you encrypt root device volume on EC2?
Yes
True or False. Termination protection is turned off by default.
True. You must turn it on.
True or False. On an EBS backed instance, the default action is for the root EBS volume to be deleted. Additionally, all additional volumes default action is to be deleted as well.
Partially True, but overall False. The additional volumes default action is not to be deleted.
True or False. EBS Root Volumes DEFAULT AMIs CAN NOT be encrypted.
False. They can be encrypted.
How long does it take for a security group change to take place?
It happens instantanously.
Can you block individual addresses using security groups?
Not really. Can’t explicitly block any IP, but can not allow it. Nothing is allowed until you allow it.
True or False. All outbound traffic is allowed on security groups.
True. Outbound traffic is stateful.
True or False. You can have any number of EC2 instances within a security group.
True.
True or False. You can have multiple security groups attached to EC2 instances.
True.
What does STATEFUL mean?
Means that if you create an inbound rule for something, an outbound rule is automatically created for it.
True or False. You can block specific IP addresses using Security Groups.
False. You cannot block specific IP addresses using Security groups, instead you need to use Network Access Control Lists.
True or False. You can deny rules in a security group.
False. You cannot do that in security groups but can do it in Network Access Control Lists.
What is EBS?
Elastic Block Storage. Essentially a virtual hard disk in the cloud.
What are the differences in the types of EBS drives?
- General Purpose SSD (gb2) - 16,000 iops/volume
- Provisioned Purpose SSD (io1) - 64,000 iops /volume
- Throughput Optimized HDD (st1) - 500 iops / volume
- Cold HDD (sc1) - 250 iops / volume
- EBS Magnetic (Standard) - 40-200 iops / volume
What are the use cases for General Purpose SSD?Description?
Most Work Loads. Up to 16,000 IOPS.
Description: General purpose SSD volume that balances price and performance for a wide variety of transactional workloads.
What are the use cases for Provisioned IOPS SSD? Description?
Databases. Up to 64,000 IOPS.
Description: Highest-performance SSD volume designed for mission-critical applications.
What are the use cases for Throughput Optimized HDD?Description?
Big Data & Data Warehouses. Up to 500 IOPS / volume.
Description: Low-cost HDD volume designed for frequently accessed, throughput-intensive workloads.
What are the use cases for Cold HDD? Description?
File Servers. Up to 250 IOPS/volume.
Description: Lowest cost HDD volume designed for less frequently accessed workloads.
What are the use cases for EBS Magenetic? Description?
Workloads where data is infrequently accessed. Between 40-200 IOPS / volume.
Description: Previous generation HDD.
True or False. EBS volumes will always be in the same availability zone as the EC2 instance.
True. By default, this is the case. You always want the EBS volume in the same availability zone as the EC2 instance. Think about it from a hardware perspective. If they are in different availability zones, you’re more likely to have lag.
How can you distinguish which EBS volume is linked to the root on the EC2?
Under EBS > Volumes > the volumes that have the “Snapshot” field populated are the ones that are for the root volume.
How do you move an EBS volume from one availability zone to another?
Click on the volume in question. Click Actions > Create Snapshot > Type in Title > Create Snapshot > Wait for Snapshot to be created
Click Snapshots > Click on snapshot > actions > create image > label > create
Click AMIs (under Images) > actions > launch > go through launching of ec2
Can you move the image to another region as well?
Yes, first you copy the AMI into the new region and then choose the EC2 you want to launch in that region off that volume.
True or False. Additional volumes attached to an EC2 instance are deleted after you terminate the EC2.
False. Only the root volume is terminated after terminating an EC2 instance. Additional volumes will persist.
Where are snapshots stored?
On S3.
True or False. Snapshots are a point in time copies of volumes. Snapshots are incremental.
True and True. Snapshots are point in time copies of volumes. They are also incremental, which means that only the blocks that have changed since your last snapshot are moved to s3.