Choosing the Right Storage Service
AMAZON EC2 INSTANCE STORE
Instance store is ephemeral block storage. This is preconfigured that exists on the same physical server that hosts the EC2 instance and cannot be detached from Amazon EC2. You can think of it as a built-in drive for your EC2 instance. Instance store is generally well-suited for temporary storage of information that is constantly changing, such as buffers, caches and scratch data. It is not meant for data that is persistent or long-lasting. If you need persistent long-term block storage that can be detached from Amazon EC2 and provide you more management flexibility, such as increasing volume size of creating snapshots, then you should use Amazon EBS.
AMAZON EBS
Amazon EBS is meant for data that changes frequently and needs to persist through instance stops, terminations, or hardware failures. Amazon EBS has two different types of volumes: SSD-backed volumes and HDD-backed volumes.
SSD-backed volumes have the following characteristics:
- Performance depends on IOPS (input/output operations per second).
- Ideal for transaction workloads such as databases and boot volumes.
HDD-backed volumes have the following characteristics:
- Performance depends on MB/s.
- Ideal for throughput-intensive workloads, such as big data, data warehouses, log processing, and sequential data I/O
- Most EBS volumes can only be attached to a single EC2 instance at a time.
AMAZON S3
If your data doesn’t change that often, Amazon S3 might be a more cost-effective and scalable storage solution. S3 is ideal for storing static web content and media, backups and archiving, data for analytics, and can even be used to host entire static websites with custom domains names. Here are a few important features of Amazon S3 to know about when comparing it to other services.
- It is block storage.
- You pay for what you provision (you have to provision storage in advance).
- EBS volumes are replicated across multiple servers in a single Availability Zone.
- Amazon S3 is not storage attached to compute.
AMAZON ELASTIC FILE SYSTEM (AMAZON EFS) and AMAZON FSx
S3 uses a flat namespace and isn’t meant to serve as a standalone file system. EBS volumes can only be attached to one EC2 at a time. So, if you need a file storage on AWS, which service should you use?
For file storage that ca mount on to multiple EC2 instance, you can use Amazon Elastic File System (Amazon EFS) or Amazon FSx.
Service | Characteristics |
---|---|
Amazon Elastic File System (EFS) | Fully managed NFS file system. |
Amazon FSx for Windows File Server | Fully managed file server built on Windows Server that supports the SMB protocol. |
Amazon FSx for Lustre | Fully managed Lustre file system that integrates with S3 |
A few important features of Amazon EFS and FSx to know about when comparing them to other services:
- It is file storage.
- Yo pay for what you use (you don’t have to provision in advance).
- Amazon EFS and Amazon FSx can be mounted onto multiple EC2 instances.