여기 정리하는 내용들은 Udemy 강의를 통해 배운 내용들을 정리하였습니다.
출처 - Udemy AWS Certified Developer Associate 2022 - New!

EBS Volume


background

Elastic Block Store = network drive
하나의 특정 AZ에 묶여있다.
network USB라고 생각할 수 있다.
1 EBS - 1 EC2 Instance 관계 (EBS Multi-Attach는 제외)
한 EC2 instance에서 다른 EC2 instance로 빠르게 옮길 수 있다.
다른 AZ로 옮기려면 snapshot이 필요하다. 없으면 옮기기 불가능하다고 합니다.


Delete on Termination attribute

EC2 instance가 terminate될때 EBS behaviour를 결정짓는 attribute입니다.
default로 root EBS volume은 deleted 되고
default로 다른 모든 EBS는 deleted 되지 않습니다.


Snapshots

EBS의 백업이라고 보면 될것 같습니다. 다른 Regions에 복사할 수 있습니다.
Snapshots를 하려면 detach를 꼭 해야하는 건 아니지만 권장사항입니다.


Volume Types

  • gp2 / gp3 (SSD) : General purpose SSD volume
    • cost-effective, low-latency (1GB ~ 16TB)
    • System boot volumes, Virtual desktops, Development and test environments에 사용될 수 있습니다.
    • gp3 특징 : IOPS와 throughput을 독립적으로 관리할 수 있습니다.(gp2에서는 독립적이지 않습니다.)
  • io1 / io2 (SSD) : Highest-performance SSD volume (4GB ~ 16TB), Provisioned IOPS(PIOPS)
    • missio-critical low-latency or high-throuphput workloads
    • 사업의 주요 applications with sustained IOPS performance. 아마 16,000 IOPS 필요한 applications…
    • databases workloads (storage performance 와 consistency가 중요할 때)

      io2 Block Express (4GB ~ 64TB)

      • Sub-millisecond latency
  • st1 (HDD) : low cost HDD volume (125MB ~ 16TB)
    • throughput-intensive work loads
    • boot volume으로 사용할 수 없습니다.
  • sc1 (HDD) : lowest cost HDD volume(125MB ~ 16TB)
    • less frequently accessed workloads
  • EBS Volume Types 링크

Size, Throuphput, IOPS에 의해 Volume Type이 결정된다.


EBS Multi-Attach (io1/io2 family)

1(EBS Volume) - Many(EC2 instances) in the same AZ 관계가 가능합니다.

clustered Linux applications에서 higher availability가 필요할 떄 사용된다고 합니다. (e.g. Teradata를 예시로 드는데 아직 뭔지 잘 모르겠습니다. 언제 한번 확인해보고 post하겠습니다.)
concurrent write operations가 필요한 Applications에도 쓰입니다.
cluster-aware인 파일 시스템을 사용합니다. (cluster-aware이 뭔지 이해하지 못했는데 알게되면 posting하려합니다.)


AMI


background

AMI = Amazon Machine Image
EC2 instance를 커스터마이징 한것이다.
pre-package 되어있기 때문에 boot, configuration 속도가 빠르다.
특정 region 안에서 빌드된다.
public AMI 와 직접만든 AMI 중에서 골라서 사용하면 됩니다.


AMI를 사용하기 위한 프로세스

  1. EC2 instance를 만듭니다.
  2. EC2 instance를 커스터마이즈 합니다.
  3. 그 instance를 stop 시켜서 data integrity 합니다.
  4. AMI를 빌드합니다. (EBS snapshots이 같이 생성됩니다.)
  5. 다른 AMIs에서 instance를 lauch합니다.


EC2 Instance Store


background

High-performance 하드웨어 disk가 필요할때 사용합니다.
ephemeral(일시적인, 단명하는) == Stop되면 EC2 instance store을 잃게됩니다. (Risk of data loss if hardware fails)
그래서, buffer / cache / scratch data / temporary content에 유리합니다. (short term storage)
Backups & Replication은 우리의 책임입니다.
Very high IOPS(Input/Output Operation Per Second)가 특징입니다.


EFS - Elastic File System

여러 EC2 instance in 여러 AZ 에 mounted 가능한 Managed Network file systme입니다.
그래서, Highly available, scalable, expensive, pay per use
접근 권환 관련하여 security group을 사용합니다.
오직 Linux based AMI 에서만 호환됩니다.
KMS를 사용하여 Encrypt합니다.
자동으로 scale되며, pay-per-use, no capacity planning 인 특징들이 있습니다.

EFS에서 알아야하는 내용은 다음과 같습니다.

  • EFS Scale
    1000s of concurrent NFS clients와 10 GB+/s throughput를 지원합니다.
    자동적으로 petabyte까지 scale이 가능합니다.
  • Performance mode
    • General purpose: latency가 중요한 건에서 사용됩니다. (e.g. web server, CMS 등)
    • Max I/O: big data, media processing 처럼 highly parallel, throughput, higher latency가 필요할때 사용됩니다.
  • Throughput mode
    • Bursting: default입니다.
    • Provisioned: store size와는 관련없이 throughput을 설정하고 싶을 때 사용됩니다. (lower size에 higher throughput이 필요할 때)
  • Storage Tiers
    • lifecycle management feature == 파일에 N 일 동안 access하지 않으면 Infrequent Access storage class로 이동시킵니다.
    • Standard: 자주 access 할 때
    • Infrequent access (EFS-IA): lower price to store


EFS를 ssh를 통해 EC2 Instance에 Attach하기 위해서는 amazon-efs-utils package를 Install 해야 합니다.
sudo yum install -y amazon-efs-utils
efs directory 필요합니다.
mkdir efs
EC2때 만든 Security Group이 NFS에서 만든 Security Group에 접근할 수 있게 해야합니다.
그래서, NFS의 Security Group의 Inbound Rule에서 Type: NFS / Source: EC2 Security Group 으로 설정합니다.