This is part of a blog series giving a high level overview of the different services examined on the AWS Solution Architect Associate exam, to view the whole series click here.
- EBS is persistent storage volumes for EC2
- EBS volumes are automatically replicated within an Availability Zone and therefore are highly available and can be used for mission critical applications.
- Very performant and can be used for throughput intensive workloads. Storage can also be increase without disturbing any current workloads.
- The EBS volume needs to be mounted to an EC2 instance within the same Availability Zone.
- You can take snapshots of your volumes which are point-in-time copies, these copies can then also be restored into new regions. The snapshots themselves are stored in S3.
- Snapshots are incremental — only blocks that have changed since your last snapshot are moved to S3.
- When snapshotting root device — best practice to terminate it first.
- You can create an EBS volume as encrypted and then also any snapshot taken of that volume will therefore be encrypted as well.
Types of EBS
There are a number different types of EBS volumes all varying in price and performance, below are some more details about them:
General Purpose SSD (GP2)
- Balances price and performance and can be used for most workloads
- Good for up to 16,000 IOPS per volume
Provisioned IOPS SSD (IO1)
- High performance SSD for mission critical applications
- Commonly used for databases
- Can go to 64,000 IOPS per volume
Throughput Optimised HDD (St1)
- Low cost hard disk drive (magnetic storage)
- Used for throughout intensive and frequently access workloads
- Typically used for big data, data warehouses and log processing
- Max 500 IOPS per volume
Cold HDD (SC1)
- Lowest cost hard disk drive (magnetic storage)
- Used for less frequently accessed workloads and when lowest storage cost is important.
- Common use could be for file servers
- Max 250 IOPS per volume
EBS Magnetic (Standard)
- Previous generation hard disk drive typically used for infrequently accessed workloads.
- Max 40–200 IOPS per volume
EBS Vs Instance Store
- Instance Store can provide temporary block level storage to your instances.
- Instance Store volumes are sometimes called Ephemeral Storage (data only persists for the lifetime of the instance it is attached to)
- All Amazon Machine Images(AMIs) have to be backed by either EBS or Instance Store.
- Both root devices are launched a little differently — with EBS the root device is launched from an EBS volume created by an EBS snapshot. Whereas, an instance store’s root device is created from a template stored in S3.
- If the host fails and stops for instance store all data will be lost.
- With EBS instance, it can be stopped and you will not lose your data — you can then reboot it.
- Both root volumes are deleted on instance termination by default. However, with EBS you can specify to keep it on creation.