blob: 9ef11b7654089b29bb63f893a66b4faadec24b7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
---
title: 09 - ec2 storage
course: ["aws solutions architect"]
---
# EC2 storage options
Storage options for EC2 instances
## EBS Volume
Elastic Block Store - network drive. Allows for data persistence.
Can only be mounted to 1 instance at a time. It's bound to AZ. But you can attach more than one volume to an instance
> Like a network USB stick. It's not a physical drive, it uses the network, so there is latency.
You can move it, but you've gotta snapshot the volume.
You can decide to terminate the EBS volume on instance termination
## EBS Snapshot
- You can snapshot your volumes to act as a backup.
- Recommended to detach volume
- Can copy across AZs - allowing volume restoration in another AZ
- Copying to archive tier is much cheaper, but restoration is longer
- Snapshot deletions can be recovered from a recycle bin
- Fast Snapshot Restore (FSR) helps with latency on restoration
- Can also create other volumes from existing snapshots, which can be in a different AZ
## EBS Volume Types
There are 6 types of EBS volume types
- GP2 / GP3 (SSD): perf/price balance
- io1 / io2 Block Express (SSD): High perf for low latency and high throughput
- st 1 (HDD): Low cost, frequent access, throughput intensive workloads
- sc 1 (HDD): Lowest cost for less frequent workloads
Characterised by SIZE | THROUGHPUT | IOPS (I/O Ops per sec)
> Only GP2/GP3 and io1 / io2 can be used at boot volumes
### General purpose SSD (gp2/gp3)
- Cost effective, low latency
- System boots
- 1GiB - 16 TiB
- Gp3: 2k - 16k IOPS & 125 MiB/s - 1k MiB/s
- Gp2: IOPS up to 16k. volume size and IOPS are linked
### Provisioned IOPS volumes (io1/1o2)
- Critical business apps
- Apps that nmeed more than 16k IOPS
- Great for DB workloads
- io1: 4gb - 16tb max 64k IOPS
- io2: 4gb - 64gb - max 256k IOPS
### HDD (st1/sc1)
- Can't be boot volumes
- 125gb - 16tb
- Throughpout optimised (st 1) - good for big data
- Infrequent access (low cost) - sc 1
Best resource: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html
### EBS multi attach
For io1/2 families you can attach same EBS volume to multiple EC2 instances in the same AZ.
This is good for high availability and concurrent writes.
> Only good for one AZ and 16 EC2 instances at the same time
## EBS Encryption
- Data encrypted at rest
- In flight encryption
- Snapshot encryption
- Uses KMs (AES-256).
## Elastic file system (EFS)
Allows for a network file system that allows multiple AZ instances to connect to the EFS through a security group.

Use cases: content management, web serving, data sharing, Wordpress. Only Linux compatible (POSIX) system and scales automatically.
It has different perf modes:
- General purpose
- Throughput mode for Max I/O
And storage classes:
- standard
- infrequent access
- archive
|