AWS EFS
AWS EFS
Answer: Amazon Elastic File System (EFS) is a fully managed, scalable file storage service that
can be used with AWS Cloud services and on-premises resources. It is designed to be highly
available, durable, and scalable, allowing multiple instances and services to access a shared file
system. EFS supports both NFS (Network File System) v4.1 and v4.0 protocols, making it ideal
for workloads that require a shared file system.
Shared file storage: For applications that need a centralized, shared file storage system
(e.g., web servers, content management systems).
Lift-and-shift applications: Moving existing on-premises applications that rely on
traditional file systems to AWS.
Big Data and Analytics: EFS is useful for storing and processing big data due to its
ability to scale seamlessly.
Backup and archiving: EFS is useful for applications requiring large-scale backup or
archival storage.
Web serving: Storing and serving web content or application data across multiple web
servers.
Home directories: Storing user data and configurations in a shared manner across many
EC2 instances.
Answer:
Amazon EFS is a file storage service, while Amazon S3 is an object storage service.
EFS is designed for use cases that require file-level access (e.g., NFS access), where
multiple EC2 instances or on-premises machines can mount the same file system and
access files concurrently.
S3 stores objects (files with metadata) in a flat namespace and is optimized for large-
scale, unstructured data storage and retrieval, typically accessed via HTTP APIs.
EFS is highly suitable for shared file systems in real-time applications, while S3 is ideal
for large-scale, durable data storage with high availability, often for backup, archiving,
and data lakes.
4. What are the key features of Amazon EFS?
Answer:
Elastic and scalable: EFS automatically scales as files are added and removed, allowing
for seamless scaling of storage.
Shared access: Multiple EC2 instances, containers, and on-premises servers can
simultaneously mount and access the same file system.
Highly available and durable: EFS is designed for 99.99% availability and stores data
redundantly across multiple Availability Zones.
Performance modes: EFS offers two performance modes: General Purpose and Max
I/O.
Automatic backup: You can enable automatic backup for your EFS file system.
Integrated with AWS services: EFS can be easily integrated with services like EC2,
Lambda, and Containers.
General Purpose: This is the default performance mode. It is suitable for latency-
sensitive applications that need low-latency file access.
Max I/O: This mode is designed for scale-out workloads that require higher throughput
and can tolerate higher latencies. It's ideal for applications that process large amounts of
data in parallel.
Bursting Throughput: This is the default throughput mode. It allows the file system to
burst to high throughput for short periods of time when required, making it cost-effective
for workloads with variable throughput demands.
Provisioned Throughput: In this mode, you can provision a specific throughput for your
file system, which is suitable for workloads that need consistent throughput regardless of
the amount of data stored in the file system.
7. What is the difference between Standard and One Zone storage classes in
Amazon EFS?
Answer:
Standard Storage Class: This is the default storage class, which stores your data across
multiple Availability Zones for high availability and durability.
One Zone Storage Class: This storage class stores data in a single Availability Zone,
which reduces costs. However, it offers lower durability and availability compared to the
Standard storage class. It's useful for workloads that can tolerate some risk of data loss in
the event of an Availability Zone failure.
Answer: Amazon EFS provides strong consistency, which means that when an application
writes data to EFS, the data is immediately visible to all clients that access the file system. EFS
ensures that only one writer can modify the data at a time, but multiple readers can access the
data simultaneously.
Answer: Security for Amazon EFS can be managed through the following methods:
IAM (Identity and Access Management) Policies: IAM policies can be used to control
who can access the EFS file system and what actions they can perform.
Security Groups: Use VPC security groups to control inbound and outbound network
traffic to EFS mount targets.
Encryption: EFS supports encryption both at rest and in transit. Data is encrypted
automatically when stored, and it can also be encrypted during transfer using the NFS
protocol.
Access Control Lists (ACLs): Use POSIX permissions or access control lists to manage
file and directory access.
10. What is the maximum file system size for Amazon EFS?
Answer: Amazon EFS automatically scales as data is added or removed, so there is no fixed
maximum file system size. It can scale to petabytes of storage, and the capacity is virtually
unlimited, based on your usage.
1. Create the EFS file system in the AWS Management Console or via AWS CLI.
2. Ensure your EC2 instances or on-premises servers have the necessary security group and
IAM role permissions to access EFS.
3. Use the mount target DNS name (provided by EFS) to mount the file system on your EC2
instances.
4. Use the NFS client (NFS v4.1 or v4.0) to mount the file system using commands like:
5. sudo mount -t nfs4 -o nfsvers=4.1 <EFS_MOUNT_TARGET_DNS>:/ <mount_point>
Answer: Yes, you can access Amazon EFS from on-premises servers, provided that the servers
are configured with the appropriate network settings. The on-premises servers must be able to
connect to your VPC through a VPN or AWS Direct Connect. You can then mount the EFS file
system to the on-premises servers using the NFS protocol.
Storage costs: Charged per gigabyte per month based on the storage you use in your file
system.
Throughput costs: Charged based on the throughput you provision (for provisioned
throughput mode).
Data transfer costs: Charged for data transferred between EFS and other AWS services
or over the internet.
Requests and operations: Charges may apply based on the number of operations
performed on the file system.
Answer:
Amazon EBS (Elastic Block Store) is block storage that is designed to be attached to a
single EC2 instance. It is ideal for applications requiring high-performance storage with
low-latency, single-instance access.
Amazon EFS is a shared file system that can be accessed by multiple EC2 instances
concurrently, making it ideal for applications that require shared file access across many
instances.
EFS automatically scales, whereas EBS requires manual resizing for larger volumes.
15. What is the backup strategy for Amazon EFS?
Answer: You can create backups of your EFS file system using AWS Backup, which allows you
to schedule automatic backups of your data. EFS also supports EFS-to-EFS replication,
enabling backup or disaster recovery scenarios by replicating data from one file system to
another in a different AWS region.
These questions cover the key concepts of Amazon EFS and its practical applications. Preparing
for these questions will help you demonstrate a solid understanding of EFS in an interview
setting.