☀️
Dev7Days
  • 😄Welcome
  • Local Setup
    • ⚙️Setup Terminal
    • ⚙️Setup IDE
    • ⚙️Setup Neovim
  • Rust
    • 🦀Cargo
  • Java
    • 🍃Spring Boot
      • Spring Boot Annotaion
      • Spring Boot Learning
    • 🍃JDK vs JRE vs JVM
    • 🍃What is JDBC ?
    • 🍃What is Data Source in Java ?
    • 🍃Check vs Unchecked Exception
    • 🍃What is Servlet in Java ?
    • 🍃Filter vs Interceptor
    • 🍃Mockito
    • 🍃Maven CLI
    • 🍃Maven Archetype
  • Go
    • 🔹Go Routine and Channel
    • 🔹Go CLI
  • Ruby and Rails
    • ♦️Ruby Syntax
    • ♦️Rails Framework
    • ♦️Rails Structure
  • Fundamental
    • 📚Git Command
    • 📚Interpreter vs Compiler
    • 📚DTO vs DAO
    • 📚Http Status
    • 📚What is Batch Process ?
    • 📚Https
    • 📚Local Storage vs Session Storage vs Cookies
    • 📚Authentication & Authorization
    • 📚Database Index
    • 📚What is GRPC ?
    • 📚What is Microservice ?
  • Database
    • 🗃️What is Transaction ?
    • 🗃️ACID
  • Postgres
    • 🐘SELECT
    • 🐘Column Alias
    • 🐘Order By
    • 🐘SELECT DISTINCT
  • Elastic Search
    • 🔍What is Elastic Search ?
    • 🔍Node and Cluster
  • Kubernetes
    • ☸️What is Kubernetes ?
    • ☸️Kubernetes Architecture
      • Node
      • ETCD
      • Kube API Server
      • Controller Manager
      • Kube Scheduler
      • Kubelet
      • Kube Proxy
  • ☸️Pod
  • ☸️ReplicaSet
  • ☸️Deployment
  • ☸️Service
  • ☸️Config Map
  • ☸️Namespaces
  • ☸️Kube Apply Command
  • ☸️Scheduling
    • Manual Scheduling
    • Labels and Selectors
    • Taints and Tolerations
    • Node Selector
    • Node Affinity
    • Resource Requirements and Limits
    • DaemonSets
    • Static Pods
    • MultipleSchedulers
  • ☸️Monitoring
  • AWS
    • 🔸How can users access AWS ?
    • 🔸IAM
    • 🔸EC2
      • User Data
      • Instance Types
      • Security Group
      • Purchasing Options
      • Placement Groups
      • Elastic Network Interface (ENI)
      • EC2 Hibernate
      • EC2 Storage
    • 🔸ELB & ASG
      • Health Checks
      • Target Group
      • ELB Types
      • Sticky Sessions
      • Cross Zone Load Balancing
      • Load Balancer - SSL and SNI
      • Deregistration Delay
      • ASG
    • 🔸RDS & Aurora DB
      • RDS
        • Storage Auto Scaling
        • Read Replica
        • Multi AZ
        • RDS Custom
        • Backup
        • RDS Proxy
      • AWS Aurora
        • Read Replica
        • Endpoint and Auto Scaling
        • Aurora Serverless
        • Global Database
        • Machine Learning
        • Backup
        • Database Cloning
      • RDS & Aurora Restore options
      • RDS & Aurora Security
    • 🔸Elastic Cache
    • 🔸Route 53
      • Records
      • Hosted Zones
      • Health Check
      • Routing Policies
  • Backend Security
    • 🎩SQL Injection
    • 🎩Cross site script (XSS)
    • 🎩Cross site request forgery (CSRF)
    • 🎩Man in the Middle (MITM)
    • 🎩Insecure Direct Object Reference (IDOR)
    • 🎩Distributed denial of service (DDOS)
  • Medium
    • 👨‍💻Gamer to Coder
    • 🐳Docker
      • Docker #1
      • Docker #2
    • 💊DI and IOC
    • ☸️Kubernetes
  • Book
    • 📚System Design Interview - An Insider's Guide (Volume 1
Powered by GitBook
On this page
  • (1) EBS (Elastic Block Storage)
  • (2) EFS (Elastic File System)
  • AMI (Amazon Machine Image)
  1. AWS
  2. EC2

EC2 Storage

PreviousEC2 HibernateNextELB & ASG

Last updated 1 year ago

There are lot of storage type in EC2 including 3 main type Network Drive , Image , Physical

For Network drive It is a network drive you can attach to EC2 instance. There are 2 storage in EC2.

  1. EBS (Elastic Block Storage)

  2. EFS (Elastic File System)

(1) EBS (Elastic Block Storage)

It is a storage persisting data after instance termination. It is possible to attach multiple EBS to one EC2.It is network drive so it uses the network to comunnicate which mean there might be a bit of latency. Moreover you allow to create a snapshot for moving volume across AZ. This volume is specific AZ.

EBS snapshots

It is a backup of our EBS volume , for backup we did not need to detach volume from EC2 instance. To Move EBS volume to another AZ or Region , It is able to do by using this snapshots.

There are 3 features for EBS Snapshots (1) Snapshot archive = Move snapshot toarchive tier to less the cost. (24 to 72hours for restore time)

(2) Recycle bin = It deletes a snapshot and stores in recycle bin for 1 day to 1 year.

(3) Fast Snapshot Restore (FSR) = It is fast to restore snapshot but It is expensive.

EBS volume types

There are 3 main type. Only gp2/gp3 and io1/io2 can be used as boot volumes.

  1. General Purpose SSD

  2. High Performance SSD

  3. HDD

(1) General Purpose: including gp2/gp3

It is cost effective storage and low latency (Not Expensive) (***Not support Multi attach)

(2) High Performance SSD: including io1/io2

It is greate for DB workloads or application that need more perfomance.(***Support Multi attach)

(3) HDD including: scl

It is lowest cost of EBS and suitable for data that is infrequently accessed.

EC2 Multi Attach

This feature is only for io1/io2 EBS volume. (Make higher application availability in case that one application fail) (Only 16 EC2 instance at a time)

EBS Encryption

It is the feature to encrypt the EBS volume. It used encryption key from KMS (AES-256).

If you are not encrpt the volume , the snapshot will not be encrypt.

In case that you want to encrypt existing EBS Volume then you need to create the snapshot of that volume , encypt the snapshot and create new EBS volume from snapshot so you will get the EBS volume was encrypted.

(2) EFS (Elastic File System)

Since it managed NFS (Network file system) that can be mounted on many EC2 across multi AZ. It is high availability , scale and expensive. This file system will scale automatically . To access EFS , it use security group to control it. It is compatible only Linux based AMI. It recommend to set Lifecycle policy to move file from EFS to EFS-IA (Storage tier) for cost saving. It used NFS protocol for communication.

Usecase

  • content management

  • wordpress

For Image In AWS it has something similar to Docker image to pack the EC2 to be image it call AMI.

AMI (Amazon Machine Image)

AMI are a customization of an EC2 instance. you can add own software ,configuration , OS etc.

It is fater boot because all your software is pre-packed. It built for specific region (can be copied across region) EC2 can launch AMI from (1) Public AMI (AWS provided) (2) Your own AMI (3) AWS marketplace AMI

For Physical If you need a high-performance hardware disk, use EC2 instance store.

  • lose storage if it stop

  • better i/o performance

  • backup and replication are your responsibility

  • risk of data loss if hardware fail

🔸
Drawing
Drawing
Drawing
Drawing