Linn Linn Htun
Linn Linn Htun
AvatarLinn Linn Htun

Amazon EFS

August 5, 2023

Amazon EFS

Amazon EFS (Elastic File System) is a fully managed, elastic NFS (Network File System) that automatically scales as you add and remove files, making it ideal for workloads that need shared file access across multiple EC2 instances. This post covers EFS use cases, how it compares to EBS, performance modes, and security configuration.

Amazon EFS(Elastic File System)

  • Use cases : content management, web serving, data sharing, WordPress
  • Uses NEFV4- I protocol
  • Uses security group to control access to EFS
  • Compatible with Linux bases AMI (not Windows)
  • Encryption at rest using KMS
  • POSIX file system (Linux) that has a standard file API
  • File system scales automatically, pay-per-use, no capacity planning

EFS performance & Storage classes

  • EFS scale
    • 1000s of concurrent NFS clients, 10GB +/s throughput
    • Grow to petabyte - scale network file system, automatically
  • Performance Mode (Set at EFS creation Time)
    • General Purpose (default) - latency-sensitive use cases (web server, CMS, etc ...)
    • MAX I/O - higher latency, throughput, highly parallel (big data, media processing) 

Throughput Mode

  • Bursting - 1TB = 50 MIB/s + burst of up to 100 MIB/s
  • Provisioned - set your throughput regardless of storage size, ex: 1 GIB/s for 1 TB storage
  • Elastic - automatically scales throughput up or down based on your workload
    • Up to 3GIB/s for reads and 1 GIB/s for writes
    • Use for unpredictable workloads

EFS storage classes

  • Storage Tiers ( lifecycle management feature - move file after N days )
  • Standard : for frequently accessed files
  • Infrequent access ( EFS - IA) cost to retrieve files, lower price to store, Enable EFS - IA with a lifecycle policy
  • Availability and durability
    • Standard : Multi-AZ, great for prod
    • One Zone: One AZ, great for dev - backup enabled by default, compatible with IA (EFS one zone - IA)
    • Ouser: 90% in cost savings

 

Hands-on

Services > EFS > Click create EFSfile system button > click customize button > choose reqional option > life circle management > choose 30 days since last access > on first access > performance settings > bursting > performance mode choose general purpose > choose security group > click next and click create

 

After create EFS > to apply EFS in instance :

  • Nextwork settings > choose one in subnet > click edit button in storage volumes > choose EFS in File systems

EFS used one storage from different network

Frequently Asked Questions

What is Amazon EFS?

Amazon EFS is a fully managed NFS file storage service that automatically scales from gigabytes to petabytes, can be mounted by thousands of EC2 instances simultaneously, and is compatible with Linux-based workloads.

When should you use EFS instead of EBS?

Use EFS when multiple EC2 instances or Lambda functions need simultaneous access to the same files, such as for content management systems, web serving, or data sharing workloads; use EBS when a single instance needs high-performance block storage.