Summary: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20260618
Storing EC2 Data
- Any data stored by an EC2 instance is stored in either:
- Internal block storage in the EC2 host (Instance Store) - ephemeral
- External storage over the NW - persistent
- Block stores: EBS volumes
- File stores: EFS drives or FSx file systems
- An EC2 instance ALWAYS requires an attached boot/root volume
- Boot volume is almost always an EBS volume
- Boot volume contains data needed for an instance OS to launch/boot
- OS-level data stored in boot volume by default
- Instance can have additional storage volumes attached to it
EC2 Instance Store
Ref: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20055816
- 🔧 High performance HW disk hosted in an EC2
- ❗ Since it's in the same HW as the instance, it's really, really fast!
- High speed, throughput, and Input/Output Operations per Second (IOPS), low latency
- ‼️ Ephemeral storage!!
- Lost if our instance is stopped or terminated!! → this usually implies deleting the instance from the EC2 host, which in turn means losing the instance store volume
- ❗ Not all EC2 instances support instance store volumes!
Amazon Elastic Block Store (EBS)
Ref: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20055762
- 🔧 Persistent Block Storage volumes over the NW
- 💡 Like a USB pendrive/stick with extra storage for your machine (instance), accessible over the NW
- Characteristics of EBS volumes
- ❗ EBS volumes tied to ONE AZ!
- An instance can have 0+ EBS volumes (it normally has at least 1 - the boot volume)
- An EBS volume is normally attached to 0-1 instances
- ❗ Storage over the NW → has some latency, less performant than HW storage like EC2 instance store
- Can persist after instance termination
- EBS boot volumes are by default terminated with EC2 instance termination, other EBS volumes persist by default after EC2 instance termination
- EBS Snapshots = backups of an EBS volume, stored in S3
- A new EBS volume can be restored from a snapshot/backup
- Restores can happen cross-AZ and cross-region
EC2 Amazon Machine Image (AMI)