EC2 Instance Storage Flashcards
EBS Volume
- An EBS (Elastic Block Store) 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
- They can only be mounted to one instance at a time (at the CCP
level) - They are bound to a specific availability zone
- Analogy:Think of them as a “network USB stick”
- Free tier: 30 GB of free EBS storage of type General Purpose (SSD) or
Magnetic per month
What happens when terminating an EC2 instance with Root Volume type and other volume Type to store data?
Root volume will be deleted, as its “Delete on Termination” attribute is enabled by default. any other volume types will not be deleted as its “delete on termination” attribute is disabled by default.
AMI
- AMI = Amazon Machine Image
- AMI are a customization of an EC2 instance
- You add your own software, configuration, operating system, monitoring… * Faster boot / configuration time because all your software is pre-packaged
- AMI are built for a specific region (and can be copied across regions). you can’t launch an EC2 instance using an AMI in another AWS region, but you can copy the ami to the target region and then use it to create your EC2 instance.
- You can launch EC2 instances from:
- A Public AMI: AWS provided
- Your own AMI: you make and maintain them yourself
- An AWS Marketplace AMI: an AMI someone else made (and potentially sells)
EBS Volume Types
- gp2 / gp3 (SSD): General purpose SSD volume that balances price and performance for a wide variety of workloads. System boot volumes,Virtual desktops, Development and test environments. max IOPS 16K.
- io1 / io2 (SSD): Highest-performance SSD volume for mission-critical low-latency or high-throughput workloads. Great for databases workloads (sensitive to storage perf and consistency). Max PIOPS: 64,000 for Nitro EC2 instances & 32,000 for other.
- st1 (HDD): Low cost HDD volume designed for frequently accessed, throughput- intensive workloads. Big Data, Data Warehouses, Log Processing.
- sc1 (HDD): Lowest cost HDD volume designed for less frequently accessed workloads.
EBS multi attach
Attach the same EBS volume to multiple EC2 instances in the same AZ
* Each instance has full read & write permissions to the high-performance volume
* Use case:
* Achieve higher application availability in clustered
Linux applications (ex:Teradata)
* Applications must manage concurrent write operations
* Up to 16 EC2 Instances at a time
* Must use a file system that’s cluster-aware (not
XFS, EXT4, etc…)
How do you encrypt an unencrypted EBS volume attached to your EC2 instance?
Create an EBS snapshot of your EBS volume. copy the snapshot and click the option to encrypt the copied snapshot. use the encrypted snapshot to create a new EBS volume.
EFS
- Elastic File System. Managed NFS (network file system) that can be mounted on many EC2
- EFS works with EC2 instances in multi-AZ
- Highly available, scalable, expensive (3x gp2), pay per use
- Mounting 100s of instances across AZ * EFS share website files (WordPress)
- Only for Linux Instances (POSIX)
- EFS has a higher price point than EBS * Can leverage EFS-IA for cost savings
Instance Store
- EBS volumes are network drives with good but “limited” performance
- If you need a high-performance hardware disk, use EC2 Instance Store
- Better I/O performance. USE WITH BIG IOPS DEMAND
- EC2 Instance Store lose their storage if they’re stopped (ephemeral)
- Good for buffer / cache / scratch data / temporary content
- Risk of data loss if hardware fails
- Backups and Replication are your responsibility
EBS Snapshots
A backup (snapshot) of your EBS volume at a point in time.
not necessary to detach volume to do snapshot but recommended
can copy snapshots across AZ or region
EBS Snapshot Archive
move snapshot to an archive tier that is 75% cheaper
takes 24-72hours for restoring the archive
Recycle Bin for EBS Snapshots
setup rules to retain deleted snapshots so you can recover them after an accidental deletion (specify retention from 1 day to 1 year)
Fast Snapshot Restore
Force full initialization of snapshot to have no latency on the first use
AMI
Amazon Machine Image.
AMI are a customization of an EC2 instance.
you add your own software, configuration, operating system, monitoring.
Faster boot/configuration time because all of your software is pre-packaged.
Built for a specific region. they are unique for each AWS region. cannot launch in another region must be copied.
You can launch from:
1) Public AMI- aws provided
2)Your own AMI: you make and maintain them yourself
3) An AWS marketplace AMI- an AMI someone else made (and potentially sells)
Gp2/Gp3 (SSD)
EBS volume type. general purpose SSD volume that balances price and performance for a wide variety of workloads.
cost effective storage, low-latency.
GP3 is newer version. you can independently set IOPS and throughput where GP2 is linked.
io1/io2 block express (ssd)
EBS volume type. highest performance SSD volume for mission critical low-latency or high throughput workloads
critical business applications wiht sustained IOPS performance, apps that need more than 16K IOPS. great for database workloads.