How stable is EBS? - amazon-web-services

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.

Related

How to use single EBS volume with a feel of spot EC2 instance

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.

AWS: i want to store all my data on EBS partition. Is it a good practise or should store on S3

I am new to AWS and trying to understand it.
Presently i have a small Django App.
I am planning to have an EC2 instance of type t3.small (2 cpus and 2 GB ram)
I will have the following EBS storages:
1) EBS root system: 10GB (mainly used for OS and other config files)
2) Attached EBS: 20GB (mainly used to store all the code and images and videos etc)
I will keep taking snapshot of both the EBS volumes daily.
I want my images and videos only accessible from the EC2 instance.
So Is this approach a good approach. or i have to use S3/
I'll go for storing in S3 for many reasons :
Duarbility : S3 is 99,99999999 (11x9). Data is replicated in all AZ of the selected region. You can also easily setup a Cross Region Replication for better data durability and security.
Price: You pay only for the disk space you're using it. You don't have to specify a volume size like with EBS.
Scalibility : You add data as you go and the bucket will scale to infinite.
If your application become successful and you have more traffic you should go to a horizontal scaling using AutoScaling and LoadBalancer and that means multiple EC2 instances. In that case it will be so easier to access Data on S3 instead on an EBS attached to an instance.

EBS Snapshots, who manages backups?

I'm starting with AWS and I've been taking my first steps on EC2 and EBS. I've learnt about EBS snapshots but I still don't understand if the backups, once you've created a snapshot, are managed automatically by AWS or I need to do them on my own.
AWS just introduced a new feature called Lifecycle Manager (in the EC2 Dashboard, at the bottom left) that allows you to create automated backups for your volumes. Once you configure a policy, AWS will handle the backup process for your volumes.
This is only a couple of weeks old so just wanted to mention here.
Snapshots are managed by AWS
snapshot of an EBS volume, can be used as a baseline for new volumes or for data backup. If you make periodic snapshots of a volume, the snapshots are incremental—only the blocks on the device that have changed after your last snapshot are saved in the new snapshot. Even though snapshots are saved incrementally,
the built in durability of EBS is comparable to a RAID in the physical sense. The data itself is mirrored (think more like a RAID stripe though) in the availability zone where the volume exists. Amazon states that the failure rate is somewhere around 0.1-0.5% annually. This is more reliable than most physical RAID setups

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.

Cost-effectively store volumes that I won't need for a few months?

I have two EC2 instances I created this summer for personal use while learning basic ML concepts and doing Kaggle competitions. I'd like to save the work on them on eventually be able to use them again if I'm interested in competing in a Kaggle competition again without having to setup a new instance, but probably won't need them for a few months (and when I do need them, it won't be at a moment's notice).
Each instance has an 128gb EBS gp2 volume that's costing me ~$13/month. I was wondering if there's a way that I could pull these off AWS so that I'm not still paying for them when I don't need them. Is there a feature where I can store a snapshot outside of AWS and eventually upload it to AWS and restore the volumes if I need them?
Or is there a much cheaper (slower) storage method for keeping them on AWS? (sc1 volumes are $0.025/GB-month, but is there something even cheaper?)
Edit: Clarified volume type ($0.10/GB-month gp2)
Edit2: I think my best bet for now is to snapshot them since each only has ~30GB of used space (60GB*$0.05 = $3/month) and delete the original volumes.
If you wish to retain the exact contents of the disk volumes, the choice really comes down to:
Amazon EBS volume snapshots
ISO images
Amazon EBS volume snapshots are only charged for blocks that are used. They are the easiest to create and restore. It is not possible to export an Amazon EBS snapshot.
If you wish to move a disk image out of Amazon EC2 (eg to download, or to store in Amazon S3), use a standard disk utility to create a .iso image of the disk. This can later be restored to a new disk volume, and can even be directly mounted in read-only mode using disk utilities.
You can put all this data into Amazon Glacier which is far more cheaper ( around 10% cost )