S3 (Simple Storage Service) là dịch vụ lưu trữ phổ biến nhất trên AWS — gần như project nào cũng dùng. Từ lưu ảnh user, host static website, đến backup database, S3 xuất hiện ở khắp nơi. Nắm vững từ vựng S3 giúp bạn đọc docs và troubleshoot nhanh hơn rất nhiều! 📦
🔹 Khái niệm cơ bản#
| English |
IPA |
Tiếng Việt |
Example |
| bucket |
/ˈbʌkɪt/ |
“thùng chứa” — container cấp cao nhất |
Create a new bucket with a globally unique name for the project assets. |
| object |
/ˈɒbdʒɪkt/ |
đối tượng — file được lưu trong bucket |
Each uploaded file is stored as an object with a unique key. |
| prefix |
/ˈpriːfɪks/ |
tiền tố — mô phỏng thư mục |
Use the prefix images/2023/ to organize photos by year. |
| storage class |
/ˈstɔːrɪdʒ klæs/ |
lớp lưu trữ (theo tần suất truy cập) |
Move infrequently accessed data to a cheaper storage class like S3 Infrequent Access. |
🔹 Quản lý dữ liệu#
| English |
IPA |
Tiếng Việt |
Example |
| versioning |
/ˈvɜːrʒənɪŋ/ |
quản lý phiên bản |
Enable versioning to recover accidentally deleted files. |
| lifecycle policy |
/ˈlaɪfˌsaɪkəl ˈpɒləsi/ |
chính sách vòng đời dữ liệu |
Set up a lifecycle policy to move objects to Glacier after 90 days. |
| replication |
/ˌrɛplɪˈkeɪʃən/ |
sao chép dữ liệu sang region khác |
Cross-region replication ensures data survives a regional outage. |
| Glacier |
/ˈɡleɪʃər/ |
lớp lưu trữ lạnh, chi phí rất thấp |
Archive old log files to Glacier to reduce monthly storage costs. |
🔹 Truy cập & Bảo mật#
| English |
IPA |
Tiếng Việt |
Example |
| presigned URL |
/priːˈsaɪnd juː.ɑːr.ˈɛl/ |
URL ký trước, có thời hạn |
Generate a presigned URL so the client can upload directly to S3. |
| ACL |
/ˌeɪ.siː.ˈɛl/ |
Access Control List — danh sách quyền |
The ACL grants public-read access to the bucket’s static assets. |
| encryption |
/ɪnˈkrɪpʃən/ |
mã hóa dữ liệu |
Enable server-side encryption to protect data at rest. |
| CORS |
/kɔːrz/ |
Cross-Origin Resource Sharing — chia sẻ tài nguyên khác nguồn |
Configure CORS rules to allow the frontend to fetch images from S3. |
🔹 Upload & Tối ưu#
| English |
IPA |
Tiếng Việt |
Example |
| multipart upload |
/ˌmʌltipɑːrt ˈʌploʊd/ |
upload nhiều phần (file lớn) |
Use multipart upload for files larger than 100 MB to improve reliability. |
| transfer acceleration |
/ˈtrænsfɜːr əkˌsɛləˈreɪʃən/ |
tăng tốc truyền tải qua CloudFront edge |
Enable transfer acceleration to speed up uploads from overseas users. |
💡 Mẹo ghi nhớ#
- Bucket = cái xô/thùng. Bạn bỏ đồ (objects) vào thùng. Tên thùng phải unique toàn cầu — giống tên miền vậy.
- Prefix không phải folder thật — S3 là flat storage.
images/cat.jpg chỉ là key có prefix images/.
- Presigned URL = “vé vào cửa có thời hạn”. Ai có link thì truy cập được, nhưng hết hạn là mất quyền.
📝 Bài tập#
Điền từ thích hợp vào chỗ trống:
- All files in S3 are stored as ___ inside a bucket.
- Enable ___ on the bucket to keep previous versions of overwritten files.
- We use a ___ to let users download private files without exposing our credentials.
- The ___ moves old backups to Glacier automatically after 30 days.
- For uploading a 2 GB video file, you should use ___ upload.
✅ Đáp án
- objects — Mỗi file trong S3 được gọi là một object, bao gồm data + metadata
- versioning — Versioning giữ lại tất cả phiên bản cũ, giúp khôi phục khi cần
- presigned URL — Presigned URL cho phép truy cập tạm thời mà không cần public bucket
- lifecycle policy — Lifecycle policy tự động chuyển hoặc xóa objects theo quy tắc
- multipart — Multipart upload chia file lớn thành nhiều phần, upload song song
Tổng kết#
S3 là service “không thể thiếu” trên AWS — hiểu 14 thuật ngữ trên sẽ giúp bạn tự tin hơn khi làm việc với storage, đọc hiểu AWS docs, và giải thích kiến trúc cho team. Bài tiếp theo mình sẽ cùng học về AWS Lambda — thế giới serverless! ⚡