EC2 Instance Storage Flashcards
EBS
- volume (Elastic Block Store)
- network drive attached to instances
- size, throughput, IOPS
- network drive attached to instances
EBS gp2/gp3 volume type
- general purpose SSD
- boot volume, virtual desktop, test env
- 1GB - 16TB
- gp3 - baseline of 3k IOPS and throughput of 125MiB/s
- can increase IOPS up to 16k and throughput up to 1k MiB/s INDEPENDENTLY
- gp2
- small gp2 volumes can burst up to 3k IOPS
- size of volume and IOPS are LINKED, max IOPS 16k
- 3 IOPS per GB = 5,334 GB we are at max IOPS
EBS io1/io2 volume type
- high performance SSD
- boot volume, 4GB - 16TB
- max PIOPS 64k for nitro EC2 instances and 32K for other
- can increase PIOPS independently from storage size
- more durability and more IOPS per GB
- io2 block express (in preview)
- 4GB - 64TB
- sub-millisecond latency
- max PIOPS: 256K with IOPS:GiB ratio of 1k to 1
- supports EBS multi-attach
- same AZ zone, one volume, multiple instances
- clustered linux app with concurrent write operations
- special kind of file system that’s cluster-aware
EBS stl volume type
- low cost HDD
- not a boot drive
- 125MB to 16TB
- good for big data, data warehouse, log processing
EBS sc1 volume type
- lowest cost HDD
- ‘cold’ storage for infrequent access
- low cost
Delete on termination attribute
default is ticked (deleted) for root volume and not for other EBS volumes.
Can change for a running instance with cli
EBS snapshots
- backup
- not necessary to detach volume to do snapshot but recommended so that it’s a clean snapshot
- can copy snapshots across AZ or Region
- snapshot archive - move snapshot to an ‘archive tier’ that is 75% cheaper
- takes between 24 to 72 hrs for restoring the archive
- recycling bin for EBS snapshots
- can setup a recycle bin for deleted snapshots so you can recover them later.
- specify retention from 1 day to a year
AMI - amazon machine image
- customization of an ec2 instance
- os, config, monitoring, etc.
- built for specific region (but can be copied across regions)
- public AMIs are provided by AWS
EC2 instance store
- physical hardware attached storage
- ephemeral (storage is lost if instance stopped)
- good for scratch, buffer, cache
- EBS is better for long term
EFS - elastic file system
- network file system
- can be mounted on many EC2 instances
- works with instances in multi-AZ
- highly available, scalable, expensive, pay per use
- use cases
- wordpress, content management, data sharing
- security group controlls access
- only linux compatible
- scales automatically
- encryption at rest using KMS
EFS performance
- thousands of concurrent NFS clients, 10GB/s throughput
- grow to petabyte scale without provisioning
- performance modes set at creation time
- general purpose (default) latency sensitive cases (web server)
- max I/O - higher latency, throughput, highly parallel (big data, media processing)
- throughput mode
- bursting (1TB = 50MiB/s + burst up to 100MiB/s)
- provisioned - set throughput regardless of storage size: i.e. 1GB/s for 1TB storage
EFS storage classes
- storage tiers (lifecycle management feature - move file after n days)
- standard: for frequent file access
- infrequent access (EFS-IA): cost to retrieve files, lower price to store. enabled with a lifecycle policy
EFS availability
- standard: multi-az, great for prod
- one zone: great for dev, backup enabled by default
- EFS one zone-IA - 90% cost in savings
EBS encryption
regional setting. You can configure your AWS account to enforce the encryption of the new EBS volumes and snapshot copies that you create. Encryption by default is a Region-specific setting. If you enable it for a Region, you cannot disable it for individual volumes or snapshots in that Region
A volume restored from an encrypted snapshot, or a copy of an encrypted snapshot, is always encrypted - By default, the CMK that you selected when creating a volume encrypts the snapshots that you make from the volume and the volumes that you restore from those encrypted snapshots. You cannot remove encryption from an encrypted volume or snapshot, which means that a volume restored from an encrypted snapshot, or a copy of an encrypted snapshot is always encrypted.