EC2-Instance-Storage Flashcards
An ____ volume is a network drive you can attach to your instances while they run.
It allows your instances to persist data, even after their termination.
Elastic Block Store (EBS)
An EBS volume can only be mounted to one instance at a time (at the CCP level).
They are bound to a specific ____.
availability zone
Because an EBS volume is a network drive:
- it uses the network to communicate with the instance, so there might be some ____.
- it can be detached from an EC2 instance and attached to another quickly
latency
Since a EBS volume is locked to an availability zone, you must create a ____ first if you want to move it across AZs.
snapshot
You must ____ an EBS when you create it by selecting the GBs and IOPS you want.
provision
Because it is provisioned, you get billed for all provisioned capacity.
You can increase the capacity of the volume over time.
EBS - Delete on Termination attribute
It controls the EBS behaviour when an EC2 instance is terminated.
- By default, the ____ EBS volume is deleted (attribute selected)
- By default, ____ EBS volume is not deleted (attribute disabled)
This attribute can be controlled by the ____ / ____.
Use Case: preserve root volume when instance is terminated
root
any other attached
AWS console / AWS CLI
True/False: You can copy EBS snapshots across AZ or Region.
True
It is not necessary to detach a volume to do a ____, but it is recommended.
snapshot
Moving an EBS snapshot to an ____ tier can be 75% cheaper.
archive
Restoring an EBS snapshot from archive can take __ to __ hours.
24 to 72
Using a ____ for EBS snapshots, you can setup rules to retain deleted snapshots.
You can specify a retention from 1 day to 1 year.
recycle bin
Using ____ forces full initialization of a snapshot to have no latency on the first use.
Very useful for restoring very large snapshots, but is expensive.
Fast Snapshot Restore (FSR)
AMI’s are a ____ of an EC2 instance where you can add your own software, configuration, OS, etc.
customization
AMI’s have a faster boot / configuration time because all your software is ____.
pre-packaged
An AMI is built for a specific ____.
region (and can be copied across regions)
What are the 3 types of AMI’s you can launch an EC2 instance from?
- a public AMI: AWS provided
- your own AMI: you make and maintain them
- AWS marketplace AMI: an AMI someone else made (and potentially sells)
The process of building an AMI:
- Start an EC2 instance and customize it (loading software, etc)
- Stop the instance (for data integrity)
- Build an AMI – this will also create EBS snapshots
- Launch instances from other AMIs
If you need a high-performance hardware disk for your EC2, use an EC2 ____ instead of an EBS volume.
instance store - this is a hard drive attached to the physical server where the EC2 is housed
The downside to an EC2 instance store is that it ….?
loses its data when the EC2 instance is stopped. This is called ephemeral storage.
The use cases for EC2 instance ____ are buffers, cache, scratch data, temporary content, etc. (short term use).
stores
One risk of EC2 instance stores is data loss from ____ failures.
Backup and replication are your ____.
hardware
responsibility
EBS Volumes come in 6 types:
- gp2 / gp3 (SSD): General purpose SSD volume that balances price and performance for a wide variety of workloads
- io1 / io2 Block Express (SSD): highest-performance SSD volume for mission-critical low-latency or high-throughput workloads
- st1 (HDD): Low cost HDD volume designed for frequently accessed, throughput-intensive workloads
- sc1 (HDD): Lowest cost HDD volume designed for less frequently accessed workloads
EBS volumes are characterized in Size, Throughput and IOPS.
With EBS volumes, only gp2/gp3 and io1/io2 Block Express can be used as ____ volumes.
boot
EBS volume use case: General Purpose (gp2/gp3)
- cost effective storage, low-latency
- system boot volumes, virtual desktops, development and test envs
- 1 GiB - 16 TiB
- gp3
- baseline of 3,000 IOPS and throughput of 125 MiB/s
- can increase IOPS up to 16,000 and throughput up to 1000 MiB/s independently
- gp2
- small gp2 volumes can burst IOPS to 3,000
- size of the volume and IOPS are linked (unlike gp3), max IOPS is 16,000
EBS volume use case: Provisioned IOPS (PIOPS) SSD
- critical business applications with sustained IOPS performance
- applications that need more than 16,000 IOPS
- great for database workloads (sensitive to storage performance and consistency)
- io2 Block Express (4 GiB - 64 TiB)
- sub-millisecond latency
- max PIOPS: 256,000 with an IOPS:GiB ratio of 1,000:1
- io1 (4GiB - 16TiB)
- max PIOPS: 64,000 for Nitro EC2 instances & 32,000 for other
- can increase PIOPS independently from storage size
Which EBS volume type supports multi-attach?
a) gp2/gp3
b) io1/io2
c) st1 / sc1
io1/io2
Which EBS volume type cannot be a boot volume?
a) gp2/gp3
b) io1/io2
c) st1 / sc1
st1 / sc1
Which HDD EBS volume type is for infrequently accessed data or where lowest cost is important?
a) st1 (throughput optimized HDD)
b) sc1 (cold HDD)
sc1
Which HDD EBS volume type is described:
- for big data, data warehouses
- max throughput of 500 MiB/s and max IOPs of 500
a) st1 (throughput optimized HDD)
b) sc1 (cold HDD)
st1
Recap EBS volume types - SSD
Recap EBS volume types - HDD
With EBS ____, you can attach the same EBS volume to multiple EC2 instances in the SAME availability zone.
Each instance has full read/write permissions to the volume.
Multi-attach
The EBS Multi-attach feature can support up to ____ instances at a time.
16
With EBS Multi-attach you must use a file system that is ____.
cluster-aware
When you create an encrypted EBS volume:
- data at rest is encrypted inside the volume
- all the data in flight moving between the instance and the volume is encrypted
- all snapshots are encrypted
- all volumes created from the snapshot are encrypted
EBS encryption and decryption are handled ____, so there is nothing you need to do.
transparently
EBS encryption has a ____ impact on latency.
minimal
EBS encryption leverages keys from ____.
KMS (AES-256)
Steps to encrypt an unencrypted EBS volume:
- create an EBS snapshot of the volume
- encrypt the EBS snapshot (using copy)
- create a new EBS volume from the snapshot
- now you can attach the encrypted volume to the original instance
Amazon ____ is a managed network file system that can be mounted on many EC2 instances.
EFS
Amazon EFS works with EC2 instances in ____.
multi-AZ
Amazon EFS is pay per use, so you don’t have to ____ in advance.
provision
With Amazon EFS, you use ____ to control access.
security groups
Amazon EFS is only compatible with ____ based AMI.
Linux
Amazon EFS has encryption at rest using ____.
KMS
No capacity planning is needed with Amazon EFS because the file system ____.
scales automatically
EFS Modes
- Performance Mode (set at EFS creation)
- General Purpose (default) - latency-sensitive use cases (web server, etc)
- Max I/O - higher latency, throughput, highly parallel (big data, media processing)
- Throughput Mode
- Bursting
- Provisioned - set your throughput regardless of storage size
- Elastic - automatically scales throughput up or down based on your workloads
- used for unpredictable workloads
Amazon EFS Storage Tiers allow for ____ to move files after a certain number of days.
- Standard: for frequently accessed files
- Infrequent access (EFS-IA): a cost to retrieve files, lower price to store
- Archive: rarely accessed data (few times a year), 50% cheaper
You can implement ____ to move files between storage tiers.
lifecycle management
lifecycle policies
Amazon EFS ____ storage tier supports multi-AZ and is great for prod.
standard
Amazon EFS ____ storage tier supports a single AZ, is great for dev, backup is enabled by default and is compatible with IA (EFS One Zone-IA).
One Zone
EBS Recap
EFS Recap