Pritam Chakraborty
Certified Solutions Architect Associate Exam
Preparation Note
MODULE 04
EC2 Storage Options
EBS Volume - Elastic Block Store
1
▪ EBS Volume is a Network Drive that is Attached to EC2 Instances
▪ Storage Connected to EC2 Over Network, not physically
▪ Thus there will be Little Latency
▪ We Can Persist EBS Data even After Terminating EC2
▪ Bound to AZ, Can’t Bind to EC2 in Different Availability Zone***
▪ FREE TIER : 30 GB EBS storage/month (General purpose/Magnetic type)
Figure 1 : EBS Volume Boundaries
EBS Multi-Attach Feature –
▪ Limited to Same AZ.
▪ Up to 16 instances at a time***.
Figure 2 : EBS with Multi-Attach Feature
Pritam
▪ When we Terminate an EC2 Instance, the EBS Volume is Deleted by Default
2
▪ We can Disable Delete on Termination to Preserve he EBS Root Volume when the
Instance is Terminated.
▪ We can Expand EBS Disk Size but can’t Shrink it***
EBS Snapshot –
▪ Backup your EBS volume any point in time.
▪ Snapshot = Backup.
▪ We can copy EBS snapshot across AZ or Region.
Figure 3 : EBS Snapshot
1. EBS Snapshot Archive -
o Move Snapshot to & archive tier ~ 75% cheaper.
o Takes 24-72 hours to restore.
2. Recycle Bin For EBS Snapshots -
o Setup recycle bin to be safe from accidental deletion.
o Retention Time can be 1 day - 1 year. ***
3. Fast snapshot Restore -
o Force Full Initialization of Snapshot to Have No Latency on the first use.
o Expensive
Pritam
EBS – Volume Types
3
EBS Volumes come in 6 types:
1. gp2 / gp3 (SSD) : General purpose SSD volume that Balances Price & Performance
for a Wide Variety of Workloads
2. io1 / io2 (SSD) : Highest-Performance SSD Volume for Mission-Critical Low-Latency
or High-Throughput Workloads
3. St 1(HDD) : Low Cost HDD Volume designed for frequently accessed, Throughput-
Intensive Workloads
4. Sc 1(HDD) : Lowest Cost HDD Volume designed for Less Frequently Accessed
Workloads
Note : Only gp1/gp3 & io1/io2 can be used as EC2 Boot Volume***
Figure 4 : EBS Volume Types
General Purpose SSD (gp2/gp3) –
▪ Cost Effective & Low Latency
▪ System Boot Volumes***
▪ 1GiB - 16 TiB
Pritam
4
Figure 5 : General Purpose SSD
Provisioned IOPS (PIOPS) SSD –
▪ For the Critical Applications with Sustained IOPS Performance
▪ For the Application that Needs More Than 16000 IOPS***
▪ Great for database workloads
Figure 6 : Provisioned IOPS SSD
HDD (Hard Disk Drives) –
▪ Can not be a Boot Volume for EC2 Instances***
▪ 125 GiB to 16 TiB
Pritam
5
Figure 7 : HDD (Hard Disk Drive)
EBS Encryption
▪ When you create an encrypted EBS volume
o Data at rest in EBS is encrypted
o All Data in Flight is Encrypted between EC2 & EBS
o All Snapshots are Encrypted
o All volumes that are created from the snapshots are encrypted
▪ Encryption and Decryption is Handled by AWS
▪ It uses Keys from AWS KMS (AES-256)
Encrypt an Unencrypted EBS volume –
1. Create an EBS snapshot of unencrypted volume
2. Encrypt the EBS snapshot by copying the unencrypted snapshot to an encrypted one
3. Create a new EBS volumes from the encrypted snapshot
Pritam
6
Figure 8 : Encryption Procedure of Unencrypted EBS Volume
AMI – Amazon Machine Image
▪ AMI Represents a Customization of EC2 Instance
○ We can Add our own OS, Software Packages, Configuration, Logging &
Monitoring
▪ Faster configuration time, all we need is already packaged.
▪ AMI are Region Scoped.***
▪ Can be copied from one region to another.
▪ We can launch EC2’s from these AMI
○ Public AMI : AWS provided
○ Your own AMI : maintained by you
○ AWS Marketplace AMI : Buy someone else’s AMI
EC2 – Instance Store
▪ EBS Volumes are network drives and we can a limited performance
▪ If we need a High-Performance Hardware Disk Solution (Physically Attached) is
Instance Store***
▪ EC2 Instance Store has Better I/O Performance
Pritam
▪ EC2 Instance Store will Lose the Storage if they are Stopped (ephemeral)
7
▪ Good for Buffer /Cache/ Scratch Data/Temporary Content
▪ Data Loss if Hardware Fails
EFS – Elastic File System
▪ Managed NFS (Network File System) that can be Mounted on many EC2
▪ Instances can be in Different AZ***
▪ Highly Available, Scalable & Expensive (3x gp2)
▪ Pay as you go
Figure 9 : Elastic File System
▪ Use case: Content Management, Web Serving, Data Sharing, WordPress***
▪ Uses NFSv4.1 protocol***
▪ Uses Security Group to control access to EFS***
▪ Compatible with only Linux Based AMI***
▪ Encryption at rest using AWS KMS
▪ Standard “Linux Posix File” file system
▪ File system in EFS Scales Automatically & follow Pay Per Use Model
▪ 1,000s of concurrent NFS client(ec2), 10GB+ /s throughput***
▪ Grow to petabyte scale automatically
Pritam
EFS Storage Class
8
Storage classes/Storage Tiers -
1. Standard : for frequently accessed files
2. Infrequent Access (EFS-IA) :
▪ Lower Cost to Store
▪ Cost to Retrieve Files
▪ Use Lifecycle Policy to Enable EFS-IA
Figure 10 : Storage Class of EFS
LifeCycle Management –
▪ Move Between Storage Classes depending how Frequently the File System is Accessed
Figure 11 : EFS Lifecycle Policy
Pritam
EFS Availability & Durability –
9
1. Standard/Regional:
a. Multi AZ***
b. Great for Production
c. Keep Copy in Each Zone of a Region as a Backup
d. Costly than One Zone.
Figure 12 : Standard Structure
2. One Zone:
a. Resides in only 1 AZ
b. Great for Development
c. If used with EFS-IA = more Discount up to 90%***
Pritam