From part 1, we discussed about EC2. In this article, we will talk about storage. There are 4 storage services commonly used in AWS: Amazon Simple Storage Service (S3), Amazon Glacier, Amazon Elastic Block Store (EBS) and EC2 Instance Storage. Later, we will know what they are and when to use them.
Amazon Simple Storage Service (S3)
Some of you may doubt why S3 is called S3, AWS just got the first character of Simple Storage Service.
Then, what is S3? It is a storage for the internet and natively online through HTTP access. It allows users to store and retrieve any amount of data any time, from anywhere on the web. Also it is highly scalable, reliable, fast and durable. Below lists some characteristics of S3:
- Unlimited number of objects
- Each object can be up to 5TB
- 99.999999999% (11×9) durability and 99.99% availability
- Support HTTP/S
- Can use server-side encryption
- Have access logs
- Provide REST and SOAP interfaces
We always use S3 for storage and backup. Also, we usually use it for application file, media and static web site hosting. In addition, we may use it for software delivery. And we sometimes use S3 to store AMIs and snapshots as well.
First of all, S3 stores data as objects within buckets. Secondly, an object is composed of a file and optionally any metadata that describes that file. Thirdly, We can have up to 100 buckets in each account. In addition, we can control access to the bucket and its objects. Finally, pricing is available as storage pricing, request pricing and data transfer pricing.
An object key is the unique identifier for an object in a bucket.
Sometimes we enable versioning to protect from accidental overwrites and deletes with no performance penalty. It generates a new version with every upload. And it allows easily retrieval of deleted objects or roll back to previous versions as well.
Amazon Glacier is similar to S3. However, Glacier is for long term low-cost archiving service. It is optimal for infrequently accessed data. The durability is same as S3 i.e. 99.999999999% (11×9). Despite this, it takes 3-5 hours’ retrieval time. On the other hand, it is only less than $0.01 per GB/month.
Some of you may observe there is another storage called S3 – Infrequent Access. It is nothing but just the middle between S3 standard and Glacier for infrequent usage.
Amazon Elastic Block Store (EBS)
EBS is a persistent block level storage volumes. It offers consistent and low-latency performance. Stored data is automatically replicated within its availability zone.
In short EBS is just like an external hard-disk of a computer. It is removable (attach and detach).
From the table, we can see there are two types of hard-disk for EBS: SSD and HDD. Generally, SSD is for higher performance but more expensive while HDD is for general use but cheaper.
We use EBS when data is quickly accessible and requires long-term persistence. In addition, we can optionally encrypt EBS volumes. Then the data at rest on the volume, disk I/O and snapshots are all encrypted. We can also create point-in-time snapshots of EBS volumes which are persisted to Amazon S3.
Below lists some use cases for EBS:
- OS: Use for boot/root volume, secondary volumes.
- Databases: Scales with our performance needs.
- Enterprise applications: Provides reliable block storage to run mission critical applications.
- Business continuity: Minimize data loss and recovery time by regularly backing up using EBS snapshots.
- Applications: Install and persist any application.
The pricing of EBS is based on region. Also, pricing is available as storage or IOPS.
For each AZ, there are multiple copy of the volume data.
Above figure shows the difference between EBS and S3. Even though they are both storage, they are natively different.
Amazon EC2 Instance Storage
Instance storage is local, complimentary direct attached block storage. It is optimal for up to 365,000 read IOPS. Also, it has no persistence. it will automatically delete data when an EC2 instance stops, fails or terminated. The big difference between instance storage and EBS is that EBS storage is persistent while instance storage is ephemeral.
Above table shows the instance lifecycle.
Today we briefly introduce 4 storage services: S3, Glacier, EBS and EC2 instance storage. Generally speaking, S3 is for media, logging and static web site hosting. Glacier is for archiving data. EBS is for fast access as secondary storage. EC2 instance is ephemeral storage for an instance.