Ends in
00
days
00
hrs
00
mins
00
secs
ENROLL NOW

🎁 Get 20% Off - Christmas Big Sale on All Practice Exams, Video Courses, and eBooks!

Amazon EBS

Amazon EBS

Last updated on January 25, 2024

Amazon EBS Cheat Sheet

  • Block level storage volumes for use with EC2 instances.
  • Well-suited for use as the primary storage for file systems, databases, or for any applications that require fine granular updates and access to raw, unformatted, block-level storage.
  • Well-suited to both database-style applications (random reads and writes), and to throughput-intensive applications (long, continuous reads and writes).
  • New EBS volumes receive their maximum performance the moment that they are available and do not require initialization (formerly known as pre-warming). However, storage blocks on volumes that were restored from snapshots must be initialized (pulled down from Amazon S3 and written to the volume) before you can access the block.
  • Termination protection is turned off by default and must be manually enabled (keeps the volume/data when the instance is terminated)
  • You can have up to 5,000 EBS volumes by default
  • You can have up to 10,000 snapshots by default

 

Features

  • Different types of storage options: General Purpose SSD (gp2,gp3), Provisioned IOPS SSD (io1,io2), Throughput Optimized HDD (st1), and Cold HDD (sc1) volumes up to 16 TiB in size or 64TiB for io2 Block Express.
  • You can mount multiple volumes on the same instance, and you can mount a Provisioned IOPS volume to multiple instances at a time using Amazon EBS Multi-Attach.
  • Enable Multi-Attach on EBS Provisioned IOPS io1 volumes to allow a single volume to be concurrently attached to up to sixteen AWS Nitro System-based Amazon EC2 instances within the same AZ.
  • You can create a file system on top of these volumes, or use them in any other way you would use a block device (like a hard drive).
  • You can use encrypted EBS volumes to meet data-at-rest encryption requirements for regulated/audited data and applications.
  • You can create point-in-time snapshots of EBS volumes, which are persisted to Amazon S3. Similar to AMIs. Snapshots can be copied across AWS regions.
  • Volumes are created in a specific AZ, and can then be attached to any instances in that same AZ. To make a volume available outside of the AZ, you can create a snapshot and restore that snapshot to a new volume anywhere in that region.
  • You can copy snapshots to other regions and then restore them to new volumes there, making it easier to leverage multiple AWS regions for geographical expansion, data center migration, and disaster recovery.
  • Performance metrics, such as bandwidth, throughput, latency, and average queue length, provided by Amazon CloudWatch, allow you to monitor the performance of your volumes to make sure that you are providing enough performance for your applications without paying for resources you don’t need.
  • You can detach an EBS volume from an instance explicitly or by terminating the instance. However, if the instance is running, you must first unmount the volume from the instance.
  • Tutorials dojo strip
  • If an EBS volume is the root device of an instance, you must stop the instance before you can detach the volume.
  • You can use AWS Backup, an automated and centralized backup service, to protect EBS volumes and your other AWS resources. AWS Backup is integrated with Amazon DynamoDB, Amazon EBS, Amazon RDS, Amazon EFS, and AWS Storage Gateway to give you a fully managed AWS backup solution.
  • With AWS Backup, you can configure backups for EBS volumes, automate backup scheduling, set retention policies, and monitor backup and restore activity.
  • EBS fast snapshot restore allows you to create a volume from a snapshot that is fully initialized. This removes the latency of I/O operations on the block when accessed for the first time.
  • Elastic Volumes allow you to increase the volume size, adjust performance, or change the volume type while the volume is in use. If your instance supports Elastic Volumes, you can do so without detaching the volume or restarting the instance.
    • This feature is available for all current-generation EBS volumes attached to current-generation EC2 instances.
    • You can continue to use your application while the changes take effect.

Types of EBS Volumes

  • General Purpose SSD (gp3)
    • Delivers a consistent baseline rate of 3,000 IOPS and 125 MiB/s. You can provision additional IOPS (up to 16,000) and throughput (up to 1,000 MiB/s) for an additional cost.
    • The maximum ratio of provisioned IOPS to provisioned volume size is 500 IOPS per GiB. The maximum ratio of provisioned throughput to provisioned IOPS is .25 MiB/s per IOPS.
  • General Purpose SSD (gp2)
    • Base performance of 3 IOPS/GiB, with the ability to burst to 3,000 IOPS for extended periods of time.
    • Support up to 16,000 IOPS and 250 MB/s of throughput.
    • The burst duration of a volume is dependent on the size of the volume, the burst IOPS required, and the credit balance when the burst begins. Burst IO duration is computed using the following formula:

Burst duration  = (Credit balance) [(Burst IOPS) – 3 (Volume size in GiB)]

    • If your gp2 volume uses all of its I/O credit balance, the maximum IOPS performance of the volume remains at the baseline IOPS performance level and the volume’s maximum throughput is reduced to the baseline IOPS multiplied by the maximum I/O size.
    • Throughput for a gp2 volume can be calculated using the following formula, up to the throughput limit of 160 MiB/s:

Throughput in MiB/s = (Volume size in GiB) (IOPS per GiB) × (I/O size in KiB)

  • Provisioned IOPS SSD (io1/io2)
    • Designed for I/O-intensive workloads, particularly database workloads, which are sensitive to storage performance and consistency. 
    • Allows you to specify a consistent IOPS rate when you create the volume
    • EBS Provisioned IOPS io2 features higher durability of 99.999%, and supports provisioning 500 IOPS for every provisioned GB. EBS io2 has 100x better volume durability and a 10x higher IOPS to storage ratio than io1, for the same price as io1.
  • Throughput Optimized HDD (st1)
    • Low-cost magnetic storage that focuses on throughput rather than IOPS.
    • Throughput of up to 500 MiB/s.
    • Subject to throughput and throughput-credit caps, the available throughput of an st1 volume is expressed by the following formula:

(Volume size)(Credit accumulation rate per TiB) = Throughput

  • Cold HDD (sc1)
    • Low-cost magnetic storage that focuses on throughput rather than IOPS.
    • Throughput of up to 250 MiB/s.

Volume Name

General Purpose SSD

Provisioned IOPS SSD

Volume type

gp3

gp2

io2

io1

Description

General Purpose SSD volume that balances price performance for a wide variety of transactional workloads

General Purpose SSD volume that balances price performance for a wide variety of transactional workloads

High performance SSD volume designed for business-critical latency-sensitive applications

High performance SSD volume designed for latency-sensitive transactional workloads

Use Cases

virtual desktops, medium sized single instance databases such as MSFT SQL Server and Oracle DB, low-latency interactive apps, dev & test, boot volumes

Boot volumes, low-latency interactive apps, dev & test

Workloads that require sub-millisecond latency, and sustained IOPS performance or more than 64,000 IOPS or 1,000 MiB/s of throughput

Workloads that require sustained IOPS performance or more than 16,000 IOPS and I/O-intensive database workloads

Volume Size

1 GB – 16 TB

1 GB – 16 TB

4 GB – 16 TB

/ 64 TB for io2 block express

4 GB – 16 TB

Durability

99.8% – 99.9% durability

99.8% – 99.9% durability

99.999%

99.8% – 99.9%

Max IOPS / Volume

16,000

16,000

64,000

/ 256,000 for io2 block express

64,000

Max Throughput  / Volume

1000 MB/s

250 MB/s

1,000 MB/s

/ 4,000 MiB/s for io2 block express

1,000 MB/s

Max IOPS / Instance

260,000

260,000

160,000

/ 260,000 MiB/s for io2 block express

260,000

Max IOPS / GB

N/A

N/A

500 IOPS/GB

/ 1,000 IOPS/GB for io2 block express

50 IOPS/GB

Max Throughput / Instance

7,500 MB/s

7,500 MB/s

4,750 MB/s

/ 7,500 MB/s for io2 block express

7,500 MB/s

Latency

single digit millisecond

single digit millisecond

single digit millisecond

single digit millisecond

Multi-Attach

No

No

Yes

Yes

 

Volume Name

Throughput Optimized HDD

Cold HDD

Volume type

st1

sc1

Description

Low cost HDD volume designed for frequently accessed, throughput-intensive workloads

Throughput-oriented storage for data that is infrequently accessed

Scenarios where the lowest storage cost is important

Use Cases

Big data, data warehouses, log processing

Colder data requiring fewer scans per day

Volume Size

125 GB – 16 TB

125 GB – 16 TB

Durability

99.8% – 99.9% durability

99.8% – 99.9% durability

Max IOPS / Volume

500

250

Max Throughput  / Volume

500 MB/s

250 MB/s

Max IOPS / Instance

260,000

260,000

Max IOPS / GB

N/A

N/A

Max Throughput / Instance

7,500 MB/s

7,500 MB/s

Multi-Attach

No

No

 

Encryption

  • Data stored at rest on an encrypted volume, disk I/O, and snapshots created from it are all encrypted.
  • Also provides encryption for data in-transit from EC2 to EBS since encryption occurs on the servers that hosts EC2 instances.
  • The following types of data are encrypted:
    • Data at rest inside the volume
    • All data moving between the volume and the instance
    • All snapshots created from the volume
    • All volumes created from those snapshots
  • Uses AWS Key Management Service (AWS KMS) master keys when creating encrypted volumes and any snapshots created from your encrypted volumes.
  • Volumes restored from encrypted snapshots are automatically encrypted.
  • EBS encryption is only available on certain instance types.
  • There is no direct way to encrypt an existing unencrypted volume, or to remove encryption from an encrypted volume. However, you can migrate data between encrypted and unencrypted volumes.
  • You can now enable Amazon Elastic Block Store (EBS) Encryption by Default, ensuring that all new EBS volumes created in your account are encrypted.

Amazon EBS Monitoring

  • Cloudwatch Monitoring two types: Basic and Detailed monitoring
  • Volume status checks provide you the information that you need to determine whether your EBS volumes are impaired, and help you control how a potentially inconsistent volume is handled. List of statuses include:
    • Ok – normal volume
    • Warning – degraded volume
    • Impaired – stalled volume
    • Insufficient-data –  insufficient data
  • Volume events include a start time that indicates the time at which an event occurred, and a duration that indicates how long I/O for the volume was disabled. The end time is added to the event when I/O for the volume is enabled.
  • Volume events are:
    • Awaiting Action: Enable IO
    • IO Enabled
    • IO Auto-Enabled
    • Normal
    • Degraded
    • Severely Degraded
    • Stalled

Modifying the Size, IOPS, or Type of an EBS Volume on Linux

  • If your current-generation EBS volume is attached to a current-generation EC2 instance type, you can increase its size, change its volume type, or (for an io1 volume) adjust its IOPS performance, all without detaching it.
  • EBS currently supports a maximum volume size of 16 TiB.
  • Two partitioning schemes commonly used on Linux and Windows systems: master boot record (MBR) and GUID partition table (GPT).
  • An EBS volume being modified goes through a sequence of states. The volume enters first the Modifying state, then the Optimizing state, and finally the Complete state.
  • You can expand a partition to a new size. Expand by using parted or gdisk.
  • Use a file system–specific command to resize the file system to the larger size of the new volume. These commands work even if the volume to extend is the root volume. For ext2, ext3, and ext4 file systems, this command is resize2fs. For XFS file systems, this command is xfs_growfs.
  • Decreasing the size of an EBS volume is not supported.

EBS Snapshots

  • Back up the data on your EBS volumes to S3 by taking point-in-time snapshots.
  • Snapshots are incremental backups, which means that only the blocks on the device that have changed after your most recent snapshot are saved. This minimizes the time required to create the snapshot and saves on storage costs by not duplicating data.
  • When you delete a snapshot, only the data unique to that snapshot is removed.

AWS Training Amazon EBS 2

  • You can share a snapshot across AWS accounts by modifying its access permissions.
  • You can make copies of your own snapshots as well as snapshots that have been shared with you.
  • A snapshot is constrained to the Region where it was created.
  • EBS snapshots broadly support EBS encryption.
  • You can’t delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first deregister the AMI before you can delete the snapshot.
  • Each account can have up to 5 concurrent snapshot copy requests to a single destination Region.
  • User-defined tags are not copied from the source snapshot to the new snapshot.
  • Snapshots are constrained to the Region in which they were created. To share a snapshot with another Region, copy the snapshot to that Region.
  • Snapshots that you intend to share must instead be encrypted with a custom CMK.

Amazon EBS–Optimized Instances

  • Provides the best performance for your EBS volumes by minimizing contention between EBS I/O and other traffic from your instance.
  • EBS–optimized instances deliver dedicated bandwidth between 500 Mbps and 60,000 Mbps to EBS.
  • For instance types that are EBS–optimized by default, there is no need to enable EBS optimization and no effect if you disable EBS optimization.

Amazon EBS Pricing

  • You are charged by the amount you provision in GB per month until you release the storage.
  • Provisioned storage for gp2 volumes, provisioned storage and provisioned IOPS for io1 volumes, provisioned storage for st1 and sc1 volumes will be billed in per-second increments, with a 60 second minimum.
  • With Provisioned IOPS SSD (io1) volumes, you are also charged by the amount you provision in IOPS per month.
  • After you detach a volume, you are still charged for volume storage as long as the storage amount exceeds the limit of the AWS Free Tier. You must delete a volume to avoid incurring further charges.
  • Snapshot storage is based on the amount of space your data consumes in Amazon S3.
  • Copying a snapshot to a new Region does incur new storage costs.
  • When you enable EBS optimization for an instance that is not EBS-optimized by default, you pay an additional low, hourly fee for the dedicated capacity.

Improving Performance

  • Use EBS-Optimized Instances
  • Understand How Performance is Calculated
  • Understand Your Workload
  • Be Aware of the Performance Penalty When Initializing Volumes from Snapshots
  • Factors That Can Degrade HDD Performance
  • Increase Read-Ahead for High-Throughput, Read-Heavy Workloads on st1 and sc1
  • Free AWS Courses
  • Use a Modern Linux Kernel
  • Use RAID 0 (Redundant Array of Independent Disks) to Maximize Utilization of Instance Resources
  • Track Performance Using Amazon CloudWatch

 

Free Amazon EBS Tutorials on YouTube:

https://www.youtube.com/user/AmazonWebServices/search?query=ebs

Other Amazon EBS-related Cheat Sheets:

 

Validate Your Knowledge

Question 1

An organization needs to provision a new Amazon EC2 instance with a persistent block storage volume to migrate data from its on-premises network to AWS. The required maximum performance for the storage volume is 64,000 IOPS.

In this scenario, which of the following can be used to fulfill this requirement?

  1. Directly attach multiple Instance Store volumes in an EC2 instance to deliver maximum IOPS performance.
  2. Launch a Nitro-based EC2 instance and attach a Provisioned IOPS SSD EBS volume (io1) with 64,000 IOPS.
  3. Launch an Amazon EFS file system and mount it to a Nitro-based Amazon EC2 instance and set the performance mode to Max I/O.
  4. Launch any type of Amazon EC2 instance and attach a Provisioned IOPS SSD EBS volume (io1) with 64,000 IOPS.

Correct Answer: 2

An Amazon EBS volume is a durable, block-level storage device that you can attach to your instances. After you attach a volume to an instance, you can use it as you would use a physical hard drive. EBS volumes are flexible.

The AWS Nitro System is the underlying platform for the latest generation of EC2 instances that enables AWS to innovate faster, further reduce the cost of the customers, and deliver added benefits like increased security and new instance types.

Amazon EBS is a persistent block storage volume. It can persist independently from the life of an instance. Since the scenario requires you to have an EBS volume with up to 64,000 IOPS, you have to launch a Nitro-based EC2 instance. 

Hence, the correct answer in this scenario is: Launch a Nitro-based EC2 instance and attach a Provisioned IOPS SSD EBS volume (io1) with 64,000 IOPS.

The option that says: Directly attach multiple Instance Store volumes in an EC2 instance to deliver maximum IOPS performance is incorrect. Although an Instance Store is a block storage volume, it is not persistent and the data will be gone if the instance is restarted from the stopped state (note that this is different from the OS-level reboot. In OS-level reboot, data still persists in the instance store). An instance store only provides temporary block-level storage for your instance. It means that the data in the instance store can be lost if the underlying disk drive fails, if the instance stops, and if the instance terminates.

The option that says: Launch an Amazon EFS file system and mount it to a Nitro-based Amazon EC2 instance and set the performance mode to Max I/O is incorrect. Although Amazon EFS can provide over 64,000 IOPS, this solution uses a file system and not a block storage volume which is what is asked in the scenario.

The option that says: Launch an EC2 instance and attach an io1 EBS volume with 64,000 IOPS is incorrect. In order to achieve the 64,000 IOPS for a provisioned IOPS SSD, you must provision a Nitro-based EC2 instance. The maximum IOPS and throughput are guaranteed only on Instances built on the Nitro System provisioned with more than 32,000 IOPS. Other instances guarantee up to 32,000 IOPS only.

References:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html#EBSVolumeTypes_piops
https://aws.amazon.com/s3/storage-classes/
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html

Cheat Sheet:

https://tutorialsdojo.com/amazon-s3-vs-ebs-vs-efs/

Note: This question was extracted from our AWS Certified Solutions Architect Associate Practice Exams.

Question 2

A Database Specialist manages an EBS-Optimized Amazon RDS for MySQL DB instance with Provisioned IOPS storage. The users recently raised a database IO latency issue during peak hours when it was always under a heavy workload. Upon review, the Specialist noticed that the RDS DB instance was barely using the maximum IOPS configured but was fully utilizing the maximum bandwidth for the required throughput. CloudWatch metrics showed that CPU and Memory utilization were at optimum levels.

Which action should the Database Specialist take to fix the performance issue?

  1. Change the underlying EBS storage type of the instance to General Purpose (SSD).
  2. Modify the DB instance to an EBS-Optimized instance class with higher maximum bandwidth.
  3. Disable EBS optimization on the MySQL DB instance to allow higher maximum bandwidth.
  4. Modify the DB instance to increase the size and corresponding Provisioned IOPS allocated to the storage.

Correct Answer: 2

Amazon RDS volumes are built using Amazon EBS volumes, except for Amazon Aurora, which uses an SSD-backed virtualized storage layer purpose-built for database workloads. RDS currently supports both magnetic and SSD-based storage volume types. There are two supported Amazon EBS SSD-based storage types, Provisioned IOPS (called io1) and General Purpose (called gp2).

Provisioned IOPS storage is a storage type that delivers predictable performance and consistently low latency. If your workload is I/O constrained, using Provisioned IOPS SSD storage can increase the number of I/O requests that the system can process concurrently.

Provisioned IOPS SSD storage provides a way to reserve I/O capacity by specifying IOPS. However, as with any other system capacity attribute, its maximum throughput under load is constrained by the resource that is consumed first. That resource might be network bandwidth, CPU, memory, or database internal resources.

EBS–optimized instances deliver dedicated bandwidth to Amazon EBS. When attached to an EBS–optimized instance, Provisioned IOPS SSD (io1) volumes are designed to achieve their provisioned performance, 99.9% of the time. Choose an EBS–optimized instance that provides more dedicated Amazon EBS throughput than your application needs; otherwise, the connection between Amazon EBS and Amazon EC2 can become a performance bottleneck.

Therefore, the correct answer is: Modify the DB instance to an EBS-Optimized instance class with higher maximum bandwidth.

The option that says: Change the underlying EBS storage type of the instance to General Purpose (SSD) is incorrect. Using a gp2 storage type can potentially degrade the performance since its maximum throughput is lower than an io1 storage type.

The option that says: Disable EBS optimization on the MySQL DB instance to allow higher maximum bandwidth is incorrect. EBS optimization is necessary to deliver dedicated bandwidth to the EBS volumes.

The option that says: Modify the DB instance to increase the size and corresponding Provisioned IOPS allocated to the storage is incorrect. Expanding the storage will not increase the bandwidth for the required throughput.

References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

Note: This question was extracted from our AWS Certified Database Specialty Practice Exams.

 

For more AWS practice exam questions with detailed explanations, visit the Tutorials Dojo Portal:Tutorials Dojo AWS Practice Tests

X

Amazon EBS Cheat Sheet Resources:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html
https://aws.amazon.com/ebs/faqs/

Get 20% Off – Christmas Big Sale on All Practice Exams, Video Courses, and eBooks!

Tutorials Dojo portal

Learn AWS with our PlayCloud Hands-On Labs

Tutorials Dojo Exam Study Guide eBooks

tutorials dojo study guide eBook

FREE AWS Exam Readiness Digital Courses

FREE AWS, Azure, GCP Practice Test Samplers

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Follow Us On Linkedin

Recent Posts

Written by: Jon Bonso

Jon Bonso is the co-founder of Tutorials Dojo, an EdTech startup and an AWS Digital Training Partner that provides high-quality educational materials in the cloud computing space. He graduated from Mapúa Institute of Technology in 2007 with a bachelor's degree in Information Technology. Jon holds 10 AWS Certifications and is also an active AWS Community Builder since 2020.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?