Section 6: EC2 Instance Storage Flashcards
EBS (Elastic Block Store) Volume
A network drive you can attach to your instances while they run. Allows instances to persist data, even after termination. Can only be mounted to one instance at a time. It’s bound to a specific AZ. Can use a snapshot to move a volume to a different AZ.
It’s a network drive, so there might be some latency. Can be detached from an EC2 instance and attached to another one quickly.
Must provision capacity (size in GB’s, and IOPS) in advance.
Delete on Termination is default for the root EBS volume, but not for other attached EBS volumes.
Only gp2/gp3 and io1/io2 Block Express can be used as boot volumes.
EBS Snapshots
Can make backups (snapshots) of your EBS volume at a point in time.
Doesn’t need to detach volume to do snapshot, but recommended.
Can copy snapshots across AZ or Region.
EBS Snapshot Archive
Move a snapshot to an “archive tier” that’s 75% cheaper.
Takes within 24-72 hours for restoring the archive.
Recycle Bin for EBS Snapshots
Setup rules to retain deleted snapshots so you can recover them after an accidental deletion. Can retain from 1 day to 1 year.
Fast Snapshot Restore (FSR)
Force full initialisation of snapshot to have no latency on the first use. It’s very expensive.
AMI (Amazon Machine Image)
It’s a customisation of an EC2 instance.
Can add your own software, configuration, OS, monitoring, etc.
Faster boot/configuration time because all your software is pre-packaged.
Built of a specific Region, and can be copied across Regions.
There are AWS-provided AMI’s, AWS Marketplace AMI, and your own AMI’s.
Need to start an EC2 instance and customise it, then stop the instance, build an AMI, then launch instances from other AMI’s.
EC2 Instance Store
A high-performance hardware disk with better I/O performance, but loses their storage if they’re stopped.
Good for buffer/cache/scratch data/temporary content.
There’s risk of data loss if the hardware fails, so need to backup and replicate.
EBS Volume Type: gp2/gp3 (SSD)
General purpose SSD volume that balances price and performance for a wide variety of workloads.
gp2
- Small gp2 volumes can burst IOPS to 3,000
- Size of the volume nad IOPS are linked, max IOPS is 16,000
- 3 IOPS per GB, means at 5,334 GB we are at the max IOPS
gp3
- Baseline of 3,000 IOPS and throughput of 125 MB/s
- Can increase IOPS up to 16,000 and throughput up to 1,000 MB/s independently
EBS Volume Type: io1/io2 Block Express (SSD)
Highest-performance SSD volume for mission-critical low-latency or high-throughput workloads.
EBS Volume Type: st1 (HDD)
Low cost HDD volume designed for frequently accessed, throughput-intensive workloads.
EBS Volume Type: sc1 (HDD)
Lowest cost HDD volume designed for less frequently accessed workloads.
General Purpose SSD
Cost effective storage, low-latency.
Great for system boot volumes, virtual desktops, development, and test environments
1 GB to 16 TB
Provisioned IOPS (PIOPS) SSD
Mainly for critical business applications with sustained IOPS performance, or applications that need more than 16,000 IOPS. Great for database workloads.
io1 (4 GB - 16 TB)
- Max PIOPS: 64,000 for Nitro EC2 instances & 32,000 for other
- Can increase PIOPS independently from storage size
io2 Block express
- Sub-millisecond latency
- Max PIOPS: 256,000 with an IOPS:GB ratio of 1,000:1
Supports EBS Multi-attach
Hard Disk Drivers (HDD)
Can’t be a boot volume.
125 GB to 16TB
Throughput Optimized HDD (st1)
- Big Data, Data Warehouses, Log Processing
- Max throughput 500 MB/s - max IOPS 500
Cold HDD (sc1)
- For data that’s infrequently accessed
- Scenarios where lowest cost is important
- Max throughput 250 MB/s - max IOPS 250
EBS Multi-Attach
Can attach the same EBS volume to multiple EC2 instances in the same AZ. Only available for the io1/io2 family.
Each instance has full read & write permissions to the high-performance volume.
Great for achieving higher application availability in clustered Linux applications, and when applications must manage concurrent write operations.
Must use a file system that’s cluster-aware. Up.
Can attach up to 16 EC2 instances at a time.