Amazon AWS Certified SysOps Administrator Associate Topic: EC2 Storage and Data Management – EBS and EFS Part 1
December 20, 2022

1. [CCP/SAA/DVA] EBS Overview

Welcome to this section, where we will look at the different storage options for EC2 instances. So first, the most important ones are going to be EBS volumes. So let’s define what they are. And EBS. Volume stands for Elastic Block Store. It’s a network drive that you can attach to your instances while they run. And we’ve been using them without even knowing. So these EBS volumes allow us to persist data even after the instance is terminated. And so that’s the whole purpose. We can recreate an instance and mount the same EBS volume as before, and we will get back our data. That is very helpful. So these EBS volumes at the CCP level can only be mounted to one instance at a time. Okay? And when you create an EBS volume, it is bound to a specific availability zone. That means that you cannot have an EBS volume created in, for example, US East One A attached to an instance in US East One B. We’ll see this in the diagram in a second. So how do you think of EBS volumes?

You can think of them as network USB sticks. So it’s a USB stick that you can take from a computer and put in another computer, but you actually don’t physically put it in a computer. It’s attached through the network. The free tier gives us 30GB of free EBS storage (of type jump, so SSD or magnetic) per month. And in this course, we’ll be using this with the GP Two or GP Three volumes. Now, let’s look at it. So, EBS volumes are network drives. As I said, it’s not a physical drive. Okay? So to communicate between the instance and the EBS volume, it will be using the network. And because their network is used, there may be a bit of latency from one computer to reach another server. Now, because EBS volumes are network drives, they can be detached from an EC2 instance and attached to another one very quickly. And that makes it super handy when you want to do failovers. For example, EBS volumes are locked to specific availability zones. That means that, as I said, if it’s created in USD 1, it cannot be attached to us. East One B. But we will see in this section that if we do a snapshot, then we are able to move a volume across different availability zones. And finally, it’s a volume.

So you have to provision capacity in advance. So you must specify the number of gigabytes and the IOPS (IO operations per second) in advance. And you’re basically defining how you want your EBS volume to perform. You’re going to get billed for that provisioned capacity, and you can increase the capacity over time if you want to have better performance or more capacity. So, as a diagram, what does it look like? We have one dollar and two simple examples. And we can attach, for example, one EBS volume to that EC2 instance if we create another EC2 instance. As I said, an EBS volume cannot be attached to more than two instances at a time at the Certified Practitioner level. And therefore, what I want to say is that this other EC2 instance needs to have its own EBS volume attached to it. But it is very possible for us to have two EBS volumes attached to one instance. Think of it as plugging two network USB sticks into one machine. That makes a lot of sense.

Now, EBS volumes are linked to an availability zone. As we can see, UST East One A has been used throughout this diagram. So if you wanted to have other EBS volumes in another AZ, then you would need to create them separately in the other Availability Zone. So in the same way that your EC2 instances are bound to an AZ, so are the EBS volumes. Finally, it is possible for us to create EBS volumes and leave them unattached. They don’t need to be necessarily attached to an instance. They can be attached on demand. And that makes it very, very powerful. Finally, when we go ahead and create EBS volumes through EC2 instances, there is something called a “Delete on Termination” attribute, and this can come up in the exam. So if you look at this, when we create an EBS volume in the console, when we create an Easy-Two instance, there is the second-to-last column called “Delete on Termination.” And by default, it is ticked for the root volume and not ticked for a new EBS volume.

So this controls the EBS behaviour when an EC2 instance is being terminated. So by default, as we can see, the rootEBS volume is deleted along with the instance being terminated. So it’s enabled. And by default, any other attached EBS volume is not deleted because it’s disabled by default. But obviously, as we can see in this UI, we can control if you want to enable or disable Delete on Termination. And so a use case for it would be, for example, that if you want to preserve the root volume when an instance is terminated, for example, to save some data, then you can disable Delete on Termination for the root volume and you’ll be good to go. And that could be an exam scenario at the exam. So I hope you liked it, and I will see you in the next lecture.

2. [CCP/SAA/DVA] EBS Hands On

Okay, so let’s have a play with EBS volumes. So, if we go to storage and click on our easy-to-instance, we can see that we have a root device detail, which is Dev XVDA. The root device type is EBS, and then if you look at the block devices that are attached to our instance, we have one volume ID here that is an EBS volume of 8 GB. So we can click on it, and we’re taken directly into the EBS console. And if I remove this volume ID, we can see all the EBS volumes in our account, which is currently just one EBS volume. So what I can do is that we can create our own EBS volume to do so; we can create the volume right here, and we can create a volume type of type GP 2. But we have a lot of different options here. But let’s go with GP Two right now because it’s simple and only 2 GB in size, and I’m going to create one availability zone that is the same as the one where my EC2 instance has been created. So we can check it out by going to this column, “Availability Zone,” right here, and it says US East to BE. So I have to change the AZ here to say “useast” to mean I will not enable encryption or add tags. I will just click on “Create the Volume.” So my volume was not created. I can again remove this filter. And now I have the two volumes. So one is in use and is the root volume of my machine, and the other is a two-gigabyte volume that is currently available.

So what we can do now is that we can right-click and attach this volume to our EC2 instance because it is in the same availability zone as our EBS volume. So if I attach it, and now it is attached, we can refresh and see that it will be very ready very soon. If we go back into our EC2 instance and refresh the information right here, we can see in the storage that now we have two block devices. We have one right here, which is 8 GB, which is a root volume, and now one is dev SDF 2 GB. Also attach a note to our instance now about how to use that volume. It’s a little bit complicated, takes a lot of time, and is out of scope, but there is a tutorial right here in the documentation. Yes, if you type “format EBS volume to attach on ECTwo instance” or something along those lines, we’re on our way. This tutorial will show you how to do it, and you can go to Google or the AIS documentation for more information. But this is a little bit more complicated and out of scope. So in this lecture, I just want to show you from the AIS perspective how EBS volumes work in this lecture.

Okay, so we have attached our volume. And so now, if we can go into the volumes right here and refresh them, yes, they’re both in use. We can create a new volume of size two gigabytes again, but this time in US East 2A, and create this volume right here. And so if we do so, we will now have three volumes, including this one. And we can attach this volume by right-clicking on it. But as we can see, there are no matching instances because a volume is linked to an availability zone. And so therefore, we would have to have an instance in US East 2A, but we don’t have one right now. We have one in US East 2B, so we cannot attach it. So I can right-click this volume and delete the volume, and it’s gone. So we can see the cloud is very powerful because, in 5 seconds, I can request storage and then delete it. And then it’s very, very amazing how fast it is, right? Think how long it would take if you had to actually do this on premises in your own data center. Okay, so this is gone. Now we can see that we have two EBS volumes in use available. Now let’s do a little experiment. This is the cloud.

So we’re going to terminate our instance and see what happens to our EBS volumes. So if we terminate this instance right here, as we can see, we have two EBS volumes right now, but this one, if we look at it, is going to terminate on a delete on termination. Okay? And this is because when we created the instances, if we go into the instance right here, when we did launch an instance, and very quickly, I’m just going to skip through the option. We had an EBS volume of 8 GB, and we had ticked the Delete on Termination attribute. So this is going to delete my EBS volume right here, but this one does not have the delete on termination attributes, and therefore, it will not be deleted. So let’s verify this by going into our EC2 instance and then terminating it right here. It terminates, and now it is terminating it, so it is shutting down, and then it will be gone. And let’s have a look at what happens to our EBS volumes. I will refresh it. And as you can see now, the two volumes are available, but very quickly, one is gone. And here we go. The only volume we have left is the two gigabyte volume, and that took about 1020 seconds. So that’s it for this lecture. I hope you liked it, and I will see you in the next lecture.

3. [CCP/SAA/DVA] EC2 Instance Store

So we’ve seen how to attach a network drive to our EC2 instances, but they have limited performance, which I say with quotes because it’s actually really good performance, but sometimes you want something even faster, which is going to be a hardware disc attached to your EC2 instance. So the EC2 instance is a virtual machine, but it is obviously attached to a real hardware server, and some of these servers do have disc space that is attached directly with a physical connection to the server. And so a special type of EC2 instance can leverage something called an EC2 instance store, which is the name of the hard drive attached to the physical server.

So what we use EC2 instances for is better I/O performance. We will also make sure that they have good throughput and so on. So they’re a great choice when you want to have extremely high disc performance. However, if you stop or terminate your EC2 instance with an instance store, the storage will be lost, which is why it is referred to as ephemeral storage. So that means that the EC2 instance cannot be used as a durable, long-term place to store your data. So what is a good use case for it, then? Well, if you have a buffer or a cache and you want to store scratch data or temporary contents, this would be a great place to do these things. but not for long-term storage. For long-term storage, EBS, for example, is a great use case. Finally, if the underlying server of the EC2 instance fails, you risk losing data because the hardware attached to the EC2 instance will also fail. If you decide to use an easy to instance, you must assume full responsibility for backing it up and replicating it correctly based on your needs. So what I mean by “better performance” is that this is just an example to illustrate it; you don’t need to know it.

But if we look at, for example, the instancesize of “I” and “something,” there is an instance tour attached to this kind of instance. And if you look at the read I operations and the write I operations, which correspond to how many IO operations we can do per second, then you can see that some of these random read I operations and write I operations can reach 3.3 million or 1.4 million for the most performant one. And to put this in comparison with an EBS volume of type GP 2, for example, you can reach 32,000 IUPs. So this is a lot more. But again, this is just to illustrate my point. from an exam perspective. Anytime you see very high-performance hardware attached to volume for your EC2 instances, think local EC2 instance store; that’s it. I will see you in the next lecture.

4. [SAA/DVA] EBS Volume Types Deep Dive

So now let’s talk about EBS volumes. And there are different volume types. They come in six different types today, and we can group them into several categories. The first one is GP 2 and GP 3, which are general-purpose SSD volumes that will balance price and performance for a wide variety of workloads. And this is something we’ve been using so far in this course. Then we have IO 1 and IO 2. They are the highest-performance SSD volumes, designed for mission-critical workloads that require low latency and high throughput. Then we have St. One volumes, which are low-cost HD volumes designed for frequently accessed, throughput-intensive workloads. We have St. One volumes, which are going to be the lowest-cost HDD volumes, and they will be designed for less frequently accessed workloads. Now, how do you define an EBS volume?

Well, you can have several factors. For example, size, throughput, and IOPS (which means I/O operations per second) And obviously, when in doubt, always consult the documentation. Only GP 2 and GP 3 and IO 1 and IO 2 can now be used as boot volumes for your EC2 instances. That is where the root OS will be installed. So now let’s do a deeper dive into GP 2, GP 3, IO 1, IO 2, and the other ones. But GP 2—the general purpose and the provisional IAPS—are going to be the most important for your exam. So, GP2 is cost-effective storage with low latency, and you can use it for system boot volumes, virtual desktop development, and test environments. The size can vary between 1 GB and 16 terabytes. And so we have differences between GP 2 and GP 3. GP Three is the most recent volume degeneration. So GP3 gives you a baseline of 3000 Iops and a throughput of 125 megabytes per second. And then we can increase IOPs up to 16,000 and three-puts up to 1000 megabytes per second independently. Okay, so they’re not linked for GP 2.

This is the older version. There are small GP-2 volumes that can burst up to 3000 IOPS, and then the size of the volume and the IOPS are linked. That means that if you increase the IOPS or the number of gigabytes on your volume, then you’re going to get three more IOPS, up to 16,000 IOPS. And so that means that if you have 5333 in 34GB, you will have 16,000 IOPS, and you’ve maxed it out. So what do you remember from this slide? Do you remember that in GP Two and GP Three, this is for cost-effective storage latency, and in GP Three, you can independently set the IOPS and the throughput, whereas for GP Two, they’re linked together. Now, the other types of volume that will come up in the exam are provision IOPS. And this is going to be a very good use case when you have a critical business application that needs sustained IOPS performance or applications that need more than 16,000 IOPS. So in general, you will have a use case where you have a database workload—for example, something that really uses the storage and is very sensitive to storage performance and consistency. In that case, switching from a GP Two or GP Three volume to an Ioan or an O2 volume is going to be the answer.

So if we consider IO and IO2, IO2 is the newer generation. There can be between four and 16 terabytes. The maximum IAPS you’re going to get is 60,000 IAPS for neutral EC-2 instances. So remember, neutral EC in two instances gives you a Nitro, which gives you access to a higher level of IOPS. And if you don’t have a Nitro EC-2 instance, then you’re going to get 30,000 to 32,000 IOPS at maximum. And with IO One and IO Two, you can increase the provisioned IOPS independently from the storage size, just like GP 3. And why do we use IO 2? Well, it has more durability and more IOPS per gigabyte at the same price as IO 1. So today it makes perfect sense to use IO 2. And there is a preview of IO-2 block express, which is between 4 GB and 64 terabytes. And this is an even higher-performance type of volume. This gives you sub millisecond latency, and you’re going to get 256,000 IOPS maximum with a ratio of IOPS per gigabyte of 1000 per one. And finally, we’ll see this in the next lecture. The EBS volume types of provisionIOPS support EBS multi attach.

So now let’s quickly touch upon St. 1 and SC 1, since they cannot be boot volumes. Excuse me. Before the previous types of volumes, you can get the size of 216 terabytes, and we get two kinds of volumes. Here we have the throughput-optimised HDD, so S Tone, which is great for big data, data warehousing, and log processing and gives you a maximum throughput of 500 megabytes per second and a maximum IOPS of 500. And then for cold HGD. So, Stone, this is for archived data. So data that is infrequently accessed And you would use it in this situation if you needed to save money. Here, the maximum throughput is 250 megabytes per second, and the maximum IOPS is 250 as well. Now, you don’t have to remember all the details going into the exam; you just need to understand the differences at a high level among all these volumes. So the general purpose SSD versus the provision I ups SSD continues the database over soonest and SD if you need the highest throughput at the lowest cost. And so you can find a summary of all I said in this link right here, okay, which is a screenshot that I just took you. So you don’t need to remember the details again, but remember that if you want to get over 32,000 IOPS, you need EC-2 nitro with I o 1 or IO 2. And that will be it for this lecture. So I hope you liked it, and I will see you in the next lecture.

5. [SAA] EBS Multi Attach

So now let’s talk about EBS multi-access. This applies to the IO-1 and IO-2 families. So I told you that an EBS volume can be attached to only one instance, and that is true except for EBS multiattach. So this feature gives you the ability to attach the same EBS volume to multiple EC2 instances within the same availability zone. So let’s do a diagram. Say we have three easy-to-create instances and an I/O 2-volume with multi-atch enabled. Then we can attach this volume to one, two, or even three easy instances at a time, and each EC2 instance will have full read and write permissions to the volume. So the use case is when you need higher application availability in a clustered Linux application, such as Teradata. So it’s not for every kind of application. And the application must be able to manage concurrent rights operations in the same volumes. So this is only for very specific types of workloads, and again, only for very specific types of EBS volumes as well. So for this, you must choose a file system that is cluster-aware. Sorry, so this is not going to be XFS or X for these kinds of things. It needs to be a special kind of file system. So just know that this capability exists at the exam. Only episodes from the IO-1 and IO-2 families can be attached to multiple EC-2 instances. Okay, that’s it for this touri lecture. I will see you at the next lecture.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!