Servisphere
Biểu tượng Amazon EFS (AWS Architecture Icons)

Amazon EFS

Thư mục chia sẻ (NFS)

Hệ thống file NFS được quản lý, nhiều EC2/container ở nhiều AZ có thể mount cùng lúc, tự tăng dung lượng.

  • Chi phí$$ Vừa phải
  • Độ khó●●●●●
  • Để không có tốn tiền?Ít
  • Serverless
  • Có trong đềSAA · SOA

Phạm vi: Regional

Mở EFS trên bản đồ →
Hình dungNhư ổ mạng chung của văn phòng: ai cũng mở được cùng một thư mục.

EFS đứng ở đâu trong hệ thống?

EFS

Xem toàn bộ trên bản đồ →

Một ví dụ thật, từng bước

  1. Website WordPress chạy trên 4 máy EC2 sau load balancer; ai đăng ảnh thì ảnh phải hiện ở cả 4 máy.
  2. Bạn tạo một hệ thống file EFS trong VPC, có mount target ở mỗi AZ.
  3. Cả 4 máy mount EFS vào thư mục wp-content/uploads; ảnh tải lên máy này thì máy khác thấy ngay.
  4. Dung lượng tự tăng theo số ảnh, bạn không phải chọn trước bao nhiêu GB.
  5. Lifecycle management chuyển ảnh ít xem sau 30 ngày sang lớp Infrequent Access để giảm tiền lưu trữ.

Khi nào nên dùng

✓ Nên dùng khi

Nhiều máy cần đọc/ghi chung file (CMS, thư mục người dùng).

✗ Không nên dùng khi

Chỉ một máy dùng, cần IOPS cao → EBS; máy Windows → FSx.

Ví dụ hay gặp

  • Thư mục chung cho nhiều EC2/container (CMS, WordPress)
  • Lưu trữ bền vững cho container ECS/EKS và Lambda
  • Thư mục home người dùng, dữ liệu ML dùng chung

EFS, EBS hay S3?

EFSEBSS3
Kiểu lưuThư mục dùng chung qua NFSỔ đĩa gắn vào một máyĐối tượng qua API
Nhiều máy cùng dùngCó, cả nhiều AZThường là khôngCó, qua API
Hệ điều hànhLinuxMọi hệ điều hànhKhông phụ thuộc
Tính tiềnTheo dung lượng thực lưuTheo dung lượng đã cấpTheo dung lượng + request

Tốn bao nhiêu tiền?

Ví dụ50 GB Standard ≈ $15/tháng; bật lifecycle chuyển file ít dùng sang IA giảm đáng kể.
  • Cách tính: Theo GB-tháng thực dùng (Standard ~$0,30/GB; lớp Infrequent Access rẻ hơn nhiều) + phí đọc/ghi tuỳ chế độ throughput.
  • Miễn phí: Không đáng kể.
⚠️ Bẫy chi phí

Đắt hơn S3 khoảng 13 lần cho dữ liệu ít truy cập; quên bật lifecycle; chọn nhầm Provisioned Throughput.

Giá tham khảo tại us-east-1, cập nhật ngày 14/10/2026, có thể đã thay đổi. Luôn kiểm tra lại trên bảng giá của AWS. Bảng giá chính thức của AWS ↗

💡 Mẹo thi

Đề có “nhiều instance Linux cần dùng chung một thư mục, tự đồng bộ” → EFS. Máy Windows cần thư mục chung → FSx for Windows File Server. Dữ liệu ít đụng tới → lifecycle sang EFS Infrequent Access.

Thử sức với câu hỏi thi thật

Đề thi chứng chỉ AWS bằng tiếng Anh nên câu hỏi giữ nguyên tiếng Anh.

1A company wants to move its on-premises network attached storage (NAS) to AWS. The company wants to make the data available to any Linux instances within its VPC and ensure changes are automatically synchronized across all instances accessing the data store. The majority of the data is accessed very rarely, and some files are accessed by multiple users at the same time. Which solution meets these requirements and is MOST cost-effective?

  1. ACreate an Amazon Elastic Block Store (Amazon EBS) snapshot containing the data. Share it with users within the VPC.
  2. BCreate an Amazon S3 bucket that has a lifecycle policy set to transition the data to S3 Standard-Infrequent Access (S3 Standard-IA) after the appropriate number of days.
  3. CCreate an Amazon Elastic File System (Amazon EFS) file system within the VPC. Set the throughput mode to Provisioned and to the required amount of IOPS to support concurrent usage.
  4. DCreate an Amazon Elastic File System (Amazon EFS) file system within the VPC. Set the lifecycle policy to transition the data to EFS Infrequent Access (EFS IA) after the appropriate number of days.
Xem đáp án

Đáp án đúng: D

EFS là thư mục dùng chung qua NFS cho nhiều máy Linux, thay đổi thấy ngay ở mọi máy. Đặt lifecycle chuyển file ít dùng sang EFS Infrequent Access để rẻ nhất. Provisioned throughput chỉ tốn thêm tiền; S3 không phải hệ thống file dùng chung.

2A company is building a web application that serves a content management system. The content management system runs on Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances run in an Auto Scaling group across multiple Availability Zones. Users are constantly adding and updating files, blogs, and other website assets in the content management system. A solutions architect must implement a solution in which all the EC2 instances share up-to-date website content with the least possible lag time. Which solution meets these requirements?

  1. AUpdate the EC2 user data in the Auto Scaling group lifecycle policy to copy the website assets from the EC2 instance that was launched most recently. Configure the ALB to make changes to the website assets only in the newest EC2 instance.
  2. BCopy the website assets to an Amazon Elastic File System (Amazon EFS) file system. Configure each EC2 instance to mount the EFS file system locally. Configure the website hosting application to reference the website assets that are stored in the EFS file system.
  3. CCopy the website assets to an Amazon S3 bucket. Ensure that each EC2 instance downloads the website assets from the S3 bucket to the attached Amazon Elastic Block Store (Amazon EBS) volume. Run the S3 sync command once each hour to keep files up to date.
  4. DRestore an Amazon Elastic Block Store (Amazon EBS) snapshot with the website assets. Attach the EBS snapshot as a secondary EBS volume when a new EC2 instance is launched. Configure the website hosting application to reference the website assets that are stored in the secondary EBS volume.
Xem đáp án

Đáp án đúng: B

Mọi máy EC2 cùng mount một thư mục EFS nên thấy nội dung mới ngay lập tức. Đồng bộ từ S3 mỗi giờ hay dùng snapshot EBS đều có độ trễ và dễ lệch dữ liệu.

Luyện thêm hơn 700 câu trên Servisphere →

Câu hỏi thường gặp

EFS có dùng được cho Windows không?

Không. EFS dùng giao thức NFS cho Linux. Máy Windows cần thư mục dùng chung qua SMB thì dùng Amazon FSx for Windows File Server.

EFS tính tiền thế nào?

Theo dung lượng thực sự lưu trữ mỗi tháng, không cần đặt trước. Bật lifecycle management để tự chuyển file ít dùng sang lớp Infrequent Access hoặc Archive rẻ hơn.

Đề thi AWS hay hỏi gì về EFS?

Tình huống nhiều instance hoặc container cần chia sẻ cùng một thư mục, chọn giữa EFS, EBS và FSx, và dùng lớp lưu trữ ít truy cập để giảm chi phí.

Dịch vụ liên quan

Mở EFS trên bản đồ →