EC2 Storage Overview
- EC2 storage provides flexible, cost-effective, and easy-to-use storage options with a unique combination of performance and durability
- While EBS and Instance store are Block level, Amazon S3 is an Object level storage
Storage Types
Elastic Block Store – EBS
- Elastic Block Store – EBS provides highly available, reliable, durable, block-level storage volumes that can be attached to an EC2 instance.
- persists independently from the running life of an instance.
- behaves like a raw, unformatted, external block device that can be attached to a single EC2 instance at a time.
- is recommended for data that requires frequent and granular updates e.g. running a database or filesystem.
- is Zonal and can be attached to any instance within the same Availability Zone and can be used like any other physical hard drive.
- is particularly well-suited for use as the primary storage for file systems, databases, or any applications that require fine granular updates and access to raw, unformatted, block-level storage.
Instance Store Storage
- Instance store provides temporary or Ephemeral block-level storage
- is located on the disks that are physically attached to the host computer.
- consists of one or more instance store volumes exposed as block devices.
- The size of an instance store varies by instance type.
- Virtual devices for instance store volumes that are ephemeral[0-23], starting the first one as ephemeral0 and so on.
- While an instance store is dedicated to a particular instance, the disk subsystem is shared among instances on a host computer.
- is ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content, or for data that is replicated across a fleet of instances, such as a load-balanced pool of web servers.
- delivers very high random I/O performance and is a good option for storage with very low latency requirements, but you don’t need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures.
Amazon EBS vs Instance Store
More detailed @ Comparison of EBS vs Instance Store
Simple Storage Service – S3
More details @ AWS S3
Elastic File Store – EFS
- Elastic File Store – EFS provides a simple, fully managed, easy-to-set-up, scalable, serverless, and cost-optimized file storage
- can automatically scale from gigabytes to petabytes of data without needing to provision storage.
- provides managed NFS (network file system) that can be mounted on and accessed by multiple EC2 in multiple AZs simultaneously.
- offers highly durable, highly scalable, and highly available.
- stores data redundantly across multiple AZs in the same region
- grows and shrinks automatically as files are added and removed, so there is no need to manage storage procurement or provisioning.
- supports the Network File System version 4 (NFSv4.1 and NFSv4.0) protocol.
- provides file system access semantics, such as strong data consistency and file locking.
- is compatible with all Linux-based AMIs for EC2, POSIX file system (~Linux) that has a standard file API.
- is a shared POSIX system for Linux systems and does not work for Windows.
- offers the ability to encrypt data at rest using KMS and in transit.
- can be accessed from on-premises using an AWS Direct Connect or AWS VPN connection between the on-premises datacenter and VPC.
- can be accessed concurrently from servers in the on-premises data center as well as EC2 instances in the VPC.
Block Device Mapping
- A block device is a storage device that moves data in sequences of bytes or bits (blocks) and supports random access and generally use buffered I/O for e.g. hard disks, CD-ROM etc
- Block devices can be physically attached to a computer (like an instance store volume) or can be accessed remotely as if it was attached (like an EBS volume)
- Block device mapping defines the block devices to be attached to an instance, which can either be done while creation of an AMI or when an instance is launched
- Block device must be mounted on the instance, after being attached to the instance, to be able to be accessed
- When a block device is detached from an instance, it is unmounted by the operating system and you can no longer access the storage device.
- Additional Instance store volumes can be attached only when the instance is launched while EBS volumes can be attached to a running instance.
- Viewing the block device mapping for an instance only shows the EBS volumes and not the instance store volumes. Instance metadata can be used to query the complete block device mapping.
Public Data Sets
- Amazon Web Services provides a repository of public data sets that can be seamlessly integrated into AWS cloud-based applications.
- Amazon stores the data sets at no charge to the community and, as with all AWS services, you pay only for the compute and storage you use for your own applications.
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- When you view the block device mapping for your instance, you can see only the EBS volumes, not the instance store volumes.
- Depends on the instance type
- FALSE
- Depends on whether you use API call
- TRUE
- Amazon EC2 provides a repository of public data sets that can be seamlessly integrated into AWS cloud-based applications. What is the monthly charge for using the public data sets?
- A 1 time charge of 10$ for all the datasets.
- 1$ per dataset per month
- 10$ per month for all the datasets
- There is no charge for using the public data sets
- How many types of block devices does Amazon EC2 support?
- 2
- 4
- 3
- 1