EFS
Elastic File System
managed Network File System that can be mounted on many EC2 in multi-AZ (as opposed to EBS which can only be attached to one instance at a time and locked on one AZ)
uses Security Groups to control access to EFS
uses NFSv4.1 protocol
EFS advantages
many different EC2 instances in different AZs can connect to the same EFS (EBS is always locked to one) and share the data
all the connected EC2 instances will be mounting the same EFS on to their file system
EFS disadvantages
expensive (3 times more than GP2) but you only pay for what you use so if you don’t store that much data and if manage your data set and size on your EFS drive well, can be even less expensive than EBS
EFS use cases
EFS constraints
only works with Linux based AMIs
Windows instances cannot mount EFS onto their file systems
only POSIX file systems (~Linux), with a standard file API
To encrypt EFS
you can use KMS keys at rest
EFS scale
EFS is built for thousands of concurrent EFS clients - thousands of EC2 instances mounting the same NFS drive at the same time
has massive scale - 10GB+ /s throughput
can grow to petabyte-scale network file system automatically
EFS Performance mode
has to be set during creation
2 options
Storage tiers
you can move files between tiers after N number of days
EFS vs EBS
storing data in EBS works great when we’re in a single instance application but it doesn’t work really great when we have many, and so maybe we can use EFS then to have a distributed application across multi AZ
now the costing aspect of it is that EBS is cheaper
than EFS but we do get a lot of advantages by using EFS especially in these kind of use cases
so again, it’s up to you as a solution architect
to really understand the trade offs for doing
and why you’re doing things and the cost
implications of what you’re doing.