TechWriterDev
  • Cloud
    • AWS
      • 00_Doubts
      • CloudPractitioner
        • Cloud Computing
        • AWS Global Infrastructure
        • Introduction to AWS EC2
        • Elastic load balancer(ELB)
        • 04_Messaging_Queuing
        • Aditional Computing Service
        • Accessing AWS resources
        • AWS Networking
        • Storage
        • Amazon Database Solutions
        • Monitoring Tools
        • AWS Security
        • Distributed Denial Of Service Attacks
      • DeveloperAssociate
        • References
        • AWS DVA-C02 Services Index
        • Services
          • 00_IAM
            • Identity and Access Management (IAM)
            • Account Protection Mechanisms
            • Access Mechanism of AWS Resources
            • Security Tools
            • Responsibility Model
            • Advanced Concepts
          • 01_EC2
            • Elastic Compute Cloud (EC2)
            • EC2 Volume Types
            • Amazon Machine Image (AMI)
            • AWS charges for IPv4 address
          • 02_SecurityGroups
            • Security Groups
          • 03_Elastic_LoadBalancing
            • Terminology
            • Elastic load balancer
            • Features
            • Basics
          • 04_AutoScaling
            • Auto Scaling
          • 05_RDS
            • Relational Database Service (RDS)
            • Aurora
            • Security
            • RDS Proxy
          • 06_ElastiCache
            • Cache
            • Cache Offerings
          • 07_Route53
            • Basics of DNS
            • Route 53
          • 08_VPC
            • Virtual Private Cloud (VPC)
          • 09_S3
            • Simple Storage Service (S3)
            • S3 Features
            • S3 Encryption
            • S3 Features
            • S3 Bucket Policy and IAM Policy
          • 10_ECS
            • Elastic Container Service (ECS)
            • Elastic Container Registry (ECR)
            • AWS Copilot
          • 11_EKS
            • Elastic Kubernetes Service (EKS)
          • 12_SDK_CLI_Tips
            • Access AWS Resources
          • 13_CloudFront
            • Cloud Front
          • 14_Messaging
            • Simple Queue Service (SQS)
            • Simple Notification Service (SNS)
            • Fan Out Pattern
            • Kinesis
            • Compare and Contrast
          • 15_ElasticBeanStalk
            • Elastic Beanstalk
          • 16_CloudFormation
            • CloudFormation
            • Dynamic References
          • 17_Monitoring
            • AWS Monitoring
            • AWS CloudWatch
            • CloudWatch Alarms
            • Synthetics Canary
            • Amazon EventBridge (formerly CloudWatch Events)
            • X-Ray
            • OpenTelemetry
            • CloudTrail
          • 18_Lambda
            • Lambda
            • Lambda Integrations
            • Configuring Lambda
            • Lambda Layers
          • 19_API_Gateway
            • API Gateway
            • API Gateway Integrations
          • 20_DynamoDB
            • DynamoDB
            • Operations
            • Indexes
            • DynamoDB Accelerator (DAX)
            • DynamoDB Streams
            • Transactions
            • Integrations
          • 21_CICD
            • CICD
            • CodeCommit
            • CodePipeline
            • CodeBuild
            • CodeDeploy
            • CodeArtifact
            • CloudGuru
          • 22_SAM
            • Serverless Application Model (SAM)
          • 23_CDK
            • Cloud Development Kit (CDK)
          • 24_StepFunctions
            • Step Functions
            • Types of step function
          • 25_AppSync
            • AppSync
          • 26_Amplify
            • Amplify
          • 27_STS
            • Security Token Service (STS)
          • 28_DirectoryService
            • Active Directory
          • 29_KMS
            • Encryption
            • KMS API
            • Features
            • Cloud Hardware Security Module (HSM)
          • 30_SSM_Store
            • SSM Parameter Store
          • 31_SecretsManager
            • Secrets Manager
          • 32_Cognito
            • Cognito
      • Questions
        • AWS_Region
        • EC2
        • IAM
  • Database
    • MongoDb
      • Mongo db Basics
      • Mongo DB Atlas
      • Document
      • Import-Export based on Data Format
      • Mongo Shell Commands
      • Query Operators
      • Indexes
      • Upsert
      • MongoDB Aggregation Framework
      • Aggregation Framework Operators
    • PostgreSQL
      • POSTGRE SQL DataTypes
      • About table
      • Constraints
  • Technologies
    • RabbitMQ
      • RabbitMQ Concepts
      • Introduction to Exchanges
      • Introduction to Queues
    • Terraform
      • 00_Introduction
      • Configuration blocks
      • Commands
      • Variables
      • Terraform Cloud
      • Modules
  • Languages
    • Java
      • Logging
        • Getting Started
      • 00_Core
        • 00_Basics
          • Java Vs C++
          • Object oriented principles
          • Steps to compile a java program
          • JVM Internals
          • Understanding Java Development Kit
          • What is JIT Compiler?
          • Java data types
          • 07_identifiers_type_conversion
          • 08_references_and_packages
          • Steps for attaching scanner
        • Concurrency
          • 00_Threads
            • Threads
          • 01_ExecutorFramework
            • Executor Framework
            • Asynchronous Computation
      • 01_Backend
        • 01_HttpAndWebServerBasics
          • HTTP
          • Content Type
          • Web Server
        • 02_J2EE_Basics
          • J2EE_Basics
          • Why HttpServlet classs is declared as abstract class BUT with 100 % concrete functionality ?
        • 03_TomCatAndSession
          • What is a Session?
          • WebContainer
        • 04_PageNavigation
          • Cookies Additional Information
          • Page Navigation Techniques
        • 05_AboutServlet
          • CGI v/s Servlet
          • Executor Framework
          • Servlet Life cycle
          • SERVLET CONFIG
          • Servlet Context
          • Servlet Listener (web application listener)
        • 08_SpringBoot
          • Spring Boot
          • Some common annotations used in spring eco system
        • 09_SpringDataJPA
          • Spring Data JPA
        • Java_Language_Changes
          • JDK enhancement tracking reference
        • 06_ORM_Hibernate
          • readmes
            • Hibernate
            • Advantages of Hibernate
            • Hibernate Caching
            • Hibernate API
            • Hibernate Query API
            • Hibernate Annotations and JPQL
            • Entity and Value Type
        • 07_SpringFramework
          • bean_validation
            • Bean Validation
          • core
            • readme
              • Spring
              • Spring Framework Modules
              • Spring MVC Request flow
              • Dependency Injection
              • Spring Beans
              • 06_Spring_Framework_Annotations
      • 03_Tools
        • Maven
          • Maven
  • SoftwareEngineering
    • DesignPatterns
      • Notes
        • Basics
        • OOP
        • SOLID Principles
        • 03_Creational
          • Abstract Factory (aka Kit)
          • Builder
          • Factory Method (aka Virtual constructor)
          • Prototype
          • Singleton
        • 04_Structural
          • Adapter (aka Wrapper)
          • Bridge (aka Handle | Body)
          • Composite
          • Decorator (aka Wrapper)
          • Facade
          • Flyweight
          • Proxy (aka Surrogate)
        • 05_Behavioral
          • Chain of Responsibility
          • Command (aka Action | Transaction)
          • Iterator (aka Cursor)
          • Observer (aka Publish-Subscribe | Dependents)
          • Strategy (aka Policy)
    • Principles
      • REST
        • REST
  • Tools
    • Containers
      • Docker
        • Docker
        • Docker Image
        • Commands
        • Compose
        • Best Practices
      • Kubernetes
        • Kubernetes
    • VCS
      • Git
        • Quick reference of useful Git commands
Powered by GitBook
On this page
  • Basics
  • EBS
  • Icon
  • About
  • EBS Volume Types
  • Snapshots
  • Instance store
  • EFS
  • Icon
  • About
  • Storage class
  • Difference between EFS and EBS
  1. Cloud
  2. AWS
  3. DeveloperAssociate
  4. Services
  5. 01_EC2

EC2 Volume Types

PreviousElastic Compute Cloud (EC2)NextAmazon Machine Image (AMI)

Last updated 1 month ago

Basics

EBS

  • Elastic Block Store

Icon

EBS Icon

About

  • Its a network drive storage that can be attached to instances while they run.

  • An EC2 instance can have multiple EBS volumes attached to it at a time.

  • Can persist data even after instance termination.

  • They can be detached from one EC2 instance to another EC2 instance fairly quickly.

  • They are bound to specific availability zone. To move an EBS volume from one availability zone to another, one can take a snapshot and create an EBS volume out of the snapshot.

  • While creation itself EBS volume's size and IOPS should be allocated and billing is done based on their selection. These attributes can be changed over time.

  • By default, a root EBS volume of EC2 instance is deleted, when EC2 instance is terminated. But other EBS volumes attached are not deleted on EC2 termination. However, this behavior for root EBS volume can be changed if need be.

  • Can be attached to multiple EC2 instance at a time (multi-attach).

  • There are three volume types

    • SSD

    • HDD

    • Previous generation

EBS Volume Types

  • There are six EBS volume types.

  • Characterized in size, throughput and IOPS.

gp2/gp3

  • General purpose SSD volume, that balances price and performance.

  • Can be used as boot volumes for EC2.

  • Size varies from 1GiB - 16TiB.

  • gp3 is newer version of volumes.

    • Can increase IOPS upto 16,000 and throughput upto 1000 MiB/s independently.

    • Baseline of 3000 IOPS and throughput of 125 MiB/s.

  • gp2 is older version of volumes.

    • Small gp2 volumes can burst IOPS uptp 3,000.

    • Size of volume and IOPS are linked, max IOPS is 16,000.

    • 3 IOPS per GB, means at 5334 GB we are at max IOPS.

io1/io2

  • Highest performance SSD volume.

  • Recommended for mission-critical low-latency or high-throughput workloads.

  • Can be used as boot volumes for EC2.

Provisioned IOPS

  • Critical for business application with sustained IOPS performance.

  • Recommended for application that needs more than 16,000 IOPS.

  • Great for database workloads.

io1

  • Size varies from 4GiB - 16TiB.

  • Max PIOPS can be upto 64,000 for Nitro EC2 instance and 32,000 for other.

  • Can increase PIOPS independently from storage size.

io2

  • Size varies from 4GiB - 64TiB.

  • Sub-millisecond latency.

  • Max PIOPS can be upto 256,000 with IOPS:GiB ratio of 1,000:1.

  • Can increase PIOPS independently from storage size.

Multi-attach

  • Supports EBS multi-attach, where an EBS volume can be attached to multiple EC2 instance (upto 16 instances at a time) in the same AZ for io1/io2 volume types.

  • Each instance has full read and write permission to the volume.

  • Use case include achieve higher application availability in clustered Linux applications. Applications must manage concurrent write operations.

  • Upto 16 EC2 instances at a time can be attached.

st1

  • Low cost HDD volume designed for frequently accessed, throughput-intensive loads.

  • It is throughput optimized.

  • Cannot be a boot volume.

  • Size varies from 125GiB - 16TiB.

  • Max throughput is 500MiB/s - max IOPS 500.

sc1

  • Cold HDD.

  • Lowest cost HDD volume designed for less frequently accessed workloads.

  • Used for data archival requirement.

  • Cannot be a boot volume.

  • Max throughput is 250MiB/s - max IOPS 250.

Snapshots

  • Allows backup of a EBS volume at a point in time.

  • Though not necessary, it is recommended to detach EBS volume while taking snapshot.

  • This allows EBS volume to be copied across different availability zone or region.

Features

EBS Snapshot Archive

  • Allows you to move a snapshot to archive tier, which is 75% cheaper.

  • Can take from 24 hours upto 72 hours to restore the snapshot.

Recycle bin

  • One can setup rules to retain deleted snapshots so that you can recover deleted snapshot.

  • Retention period can be from 1 day upto 1 year by creating retention rule.

  • Retention rule can be locked from accidental modification.

Fast snapshot restore (FSR)

  • Allows forceful initialization of snapshot to have no latency on first use.

  • Expensive

  • Useful when EBS volume has huge size and need to be initialized quickly.


Instance store

  • An instance store provides temporary block-level storage for your instance.

  • This storage is located on disks that are physically attached to the host computer.

  • Better I/O performance (IOPS).

  • Also known as ephemeral storage because once EC2 instance is stopped or terminated, data contained in the store are lost. However, data on the store persists in case of a reboot.

  • Unlike EBS, Instance store volumes are attached only at instance launch, and they cannot be detached from one EC2 instance to another.

  • Risk of data loss due to hardware failure is possible, hence backup and replication should be your responsibility.


EFS

  • Elastic File Storage

Icon

About

  • Managed NFS (Network File System) which uses NFSv4.1 protocol that can be mounted on many EC2 instances.

  • EFS can be mounted on hundreds of EC2 instances which are in different availability zone.

  • Highly available, Scalable and Expensive with pay per use payment model.

  • As it is scalable, the file system will scale automatically upto Petabyte scale compared to EBS.

    • Supports 1000s of concurrent NFS client.

    • Upto 10 GB/s of throughput

  • Use cases include - content management, web serving, data sharing, Wordpress etc.

  • Compatible with Linux based AMI (not windows).

  • Supports encryption at rest using KMS.

  • It has different Performance mode which can be set at creation time,

    • General purpose : This is the default mode, useful for latency sensitive scenario.

    • Max I/O : Useful for higher latency, higher thoughput, highly parallel use cases like big data, media processing.

  • It supports Throughput mode such as,

    • Bursting - For 1 TB of storage, you can get 50 MiB/s, with burst upto 100 MiB/s, as storage grows.

    • Provisioned - Consistent throughput regardless of storage size. Storage size and throughput are not connected. Has to pay for the provisioned throughput capacity.

    • Elastic - Automatically scales throughput based on the workload, making it a great fit for unpredictable workloads.

      • Upto 3GiB/s for reads and 1 GiB/s for writes.

      • Recommended

Storage class

Based on Lifecycle

  • This feature allows to move file to different tiers based on frequency of access of files.

  • This is configured through lifecycle management policy.

Standard/Regional

  • Can be used for frequently accessed files.

  • These are multi-AZ with backups stored across multiple AZ.

Infrequent Access (IA)

  • Can be used to store files at lower price.

  • Cost to retrieval of files is high.

Archive

  • Rarely accessed data can be stored here.

  • It is 50% cheaper.

Based on durability and availability

OneZone

  • Can be accessed only in one availability zone.

  • Backup is enabled by default and is stored in the same AZ as the original file.

  • Can be used for frequently accessed files but does not require high availability or durability.

OneZone IA

  • Can be used for long lived, infrequently accessed files but does not require high availability or durability.

  • Over 90% cost savings.

Difference between EFS and EBS

Features
EBS
EFS

Acronym

Elastic Block Store

Elastic File Storage

Service Type

Availability Zone

Regional

Multi-Attach

Supported only by io1/io2

Supported

Migration strategy

Create a snapshot in one AZ and restore in another

Not need as its regional by default

Backup Strategy

Create Snapshot, should not backup while handling too much traffic

Incremental backup

Delete on termination of EC2 instance

Yes, if it is a root volume and configured to be deleted on termination

No

Storage class

Not supported

Supported

Volume type

Yes

Not a volume based storage

More details about volume types can be found .

When using multi-attach feature of this volume type, make sure to use file system.

Some events during an EC2 instance life cycle may result in data erasure. More details can be found .

EFS Icon
here
cluster-aware
here
Introduction