How to use single EBS volume with a feel of spot EC2 instance - amazon-web-services

I am preparing for AWS certification and I found following question in mock test.
The Question is as mentioned in below image :
And they have mentioned EBS volume in the question, I selected to choose "Provisioned IOPS SSD Volume" to implement scalable and high throughput.
But the correct answer was EFS with the following justification.
But, I think EBS volume can only be mapped with one EC2 instance at a time. Can we map one EBS volume with feet of multiple EC2 instance ?

No, you can't map an EBS volume to more than one instance at a time.
But EFS doesn't use EBS, and an EFS filesystem had no meaningful limit on the number of EC2 instances that can access it simultaneously.
The question isn't a very good one. In fact, it proposes an initial scenario that you would never use.
EBS volumes attached to members of an auto-scaling group would never be used to store CMS documents uploaded by users, because those volumes will ether be destroyed or left attached to nothing when the cluster scales in and some of the instances are terminated due to the decreased load.
The giveaway to the correct answer lies in the fact that the question asks for a scalable, high-throughput, POSIX-compliant filesystem and this is pretty much the definition of Amazon EFS. EFS will scale larger than the largest provisioned IOPS EBS volume.

Related

AWS EBS read bandwidth Under-provisioned Question

I am new to Aws, recently I checked my Compute Optimizer
found the following:
"Compute Optimizer found that this instance's EBS throughput is under-provisioned."
EBS read bandwidth (MiB/second)
EBS write bandwidth (MiB/second)
both Under-provisioned from AWS Compute Optimizer.
I am not so sure how to increase, AWS Compute Optimizer showed few different instance type to switch from, but there is no information about the EBS read and write bandwidth.
There is a tab for instance and Attached EBS volumes. So should I update the instance with the recommend one or update the EBS volumes, which one will increase the EBS read/write bandwidth?
any help would be much appreciated.

AWS EC2 Local Storage Volumes/nvme volume

I am using "m5d.8xlarge" ec2 instance, which comes ready with 2*600G SSD Volumes, directly attached. They are appearing on the OS, however no mention on the console, as I can't retrieve any info about them.
And it is showing as well the serial of the volumes as AWS-*** not as normal EBS volumes vol***.
I read that these are ephemeral or something; I want to have any AWS official docs that thoroughly explain how this local storage works, as we are hosting prod workload on it, appreciate if someone can explain or provide docs.
"m5d.8xlarge" ec2 instances comes with 2 ephimeral storage which are instance store volume.
Instance store volumes (docs) are directly attached to underlying hardware to reduce latency and increase IOPS and data throughput.
However there is a caveat, if you ec2 instance is terminated,stops, hibernated or stopped or underlying hardware gets shutdown due to some glitch all the data stored on on these ephemeral storage will be lost.
Generally instance store volumes are used for buffer,cache.
In order to confirm you can follow this https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-instance-store-volumes/ :-
ssh into ec2 instance
install nvme-cli tool -> sudo yum instal nvme-cli
sudo nvme list - to list all instance store volumes
if you want data to persist you should go for EBS or EFS
EBS docs, EFS docs
In short If you want to access data with super low latency and you can afford to loose data go for instance store but if it is business critical data for example database workload go for EBS, YOu can still achieve very high IOPS and throughput using IO1,IO2 volume types or if you have a want to go even further use nitro ec2 instance type which gives maximum 64000 IOPS.
Play with EBS volume types to increase IOPS and throughput https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html

How to synchronize data between 2 EBS volumes in AWS?

I have 2 EBS volumes in 2 availability zones in the same region, one is primary and another is backup. Generally, I just read and write data from primary volume. Is it possible to synchronize data from primary to back up EBS volume? if yes, how can I do that?
Thanks
1 year after this question has been posted but I hope it helps anyone looking into this.
Amazon EFS is a great solution. An alternative for what you require is using Snapshots. With AWS Backup you can schedule Amazon EBS snapshots and have them shared across AZ or even different accounts.
As very well proposed in the previous answer, you should first try to understand your performance requirements for the workload and also the RPO and RTO requirements.
Comparing EFS and EBS, I could say that:
A. EFS (Elastic File System) is a managed parallel NFS (based on NFSv4). You are going to mount it as a directory. EFS leverages the same technology as EBS, and the disks are replicated in the AZ and also between AZ. You don’t chose or control the disks, just what performance you expect from the managed service.
B. EBS (Elastic Block Storage) is also network attached but is a block storage, which means that your OS will see it as a disk and not a directory. You have to format it as a file system (or group it with other EBS and create LVM, RAID, etc) before you can use it. EBS are replicated within the same AZ but bot across AZ. You can have snapshots of your EBS and copy them to the other AZ, for example.
So you have to take into account not only the performance you require but also what type of storage (block or file) your application need.
Can you use EFS for this? You might be able to avoid having to replicate the data is you can have the primary and backup instance/applications looking at the same data volume.

Extending the EBS Volume in AWS

Currently i have created EBS Backed(30GB) EC2 Instance, data in EBS has reached to almost maximum capacity.
What would be best practice to increase the size of EBS volume with high availability
a) Extend the existing EBS volume by taking snapshot
b) Attach new EBS Volume
In case we extend the EBS volume we have to take snapshot ,then stop instance and recreate ebs volume with this snapshot.
Will EC2 Instance boot from newly created EBS volume.
Ideal Way of doing this !
Yes precisely you are thinking in the right direction.
You could automate it with multiple sequential lambdas or bash would be also an ideal solution to your query.
How much should space should we increase?
Above will depend on your EBS storage filling rate. Make a wise choice accordingly.

How stable is EBS?

I'm thinking about saving data from EC2 instances to the EBS and later save the result on S3. I don't have a lot of experience working with EBS, so my questions are:
How stable they are? I mean how often (if any) you had problem with EBS. Do they crash if overloaded or something like this?
What are the chances of loosing data from EBS?
Is it possible to mount one EBS to the multiple Instances? (let's say two ec2 share the same ebs )
I assume you've read AWS's take on EBS
Pretty stable. Last year, 10% of EBS volumes failed in 2-3 data centers in us-east for a couple hours. This is the only issue I've ever had with them.
I've never lost data from EBS. Even if I had, I take hourly snapshots (stored in s3), so I would have been just fine.
Not at the same time. To attach it to another instance, you must detach from the currently attached one.
Perhaps what you're look is s3fs - a way to mount s3 as a filesystem.
EBS is quite stable and every data you write is redundantly copied in 3 disks inside a AZ. If you take regular snapshots of your EBS volumes you can protect your data more. Since EBS operate in AZ scope it is recommended to moves assets like user documents, images, videos to Amazon S3. S3 offer more redundancy and availability than an EBS Volume.
You cannot mount single EBS volume to Multiple EC2 instances. You will have to use Solution like GlusterFS on AWS so that multiple EC2 instances can talk to common storage pool.