Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
PostgreSQL Multi-AZ DB instance, which has AWS KMS encryption enabled using the default KMS key. A database specialist planned to share the most recent automated snapshot with the staging account, but discovered that the option to share snapshots is disabled in the AWS Management Console.
What should the database specialist do to resolve this?
- A Disable automated backups in the DB instance. Share both the automated snapshot and the default KMS key with the staging account. Restore the snapshot in the staging account and enable automated backups.
- B Copy the automated snapshot specifying a custom KMS encryption key. Share both the copied snapshot and the custom KMS encryption key with the staging account. Restore the snapshot to the staging account within the same Region.
- C Modify the DB instance to use a custom KMS encryption key. Share both the automated snapshot and the custom KMS encryption key with the staging account. Restore the snapshot in the staging account.
- D Copy the automated snapshot while keeping the default KMS key. Share both the snapshot and the default KMS key with the staging account. Restore the snapshot in the staging account.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh tình huống một đội ngũ phát triển cần khôi phục dữ liệu sản xuất vào tài khoản staging trên AWS. Cơ sở dữ liệu sản xuất đang chạy trên Amazon RDS for PostgreSQL Multi-AZ DB instance, được mã hóa bằng AWS KMS với default KMS key (mặc định là aws/rds). Chuyên viên cơ sở dữ liệu dự định chia sẻ automated snapshot mới nhất với tài khoản staging, nhưng phát hiện tùy chọn share snapshots bị vô hiệu hóa trong AWS Management Console.
📌 Vấn đề cốt lõi: Automated snapshots được mã hóa bằng default AWS-managed KMS key không thể chia sẻ cross-account trực tiếp, vì default key không hỗ trợ chia sẻ với tài khoản khác (chỉ customer-managed KMS keys mới cho phép). Đây là hạn chế bảo mật của AWS RDS (cập nhật đến năm 2026, theo RDS User Guide). Giải pháp cần copy snapshot với custom KMS key để chia sẻ an toàn trong cùng Region.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Copy the automated snapshot specifying a custom KMS encryption key. Share both the copied snapshot and the custom KMS encryption key with the staging account. Restore the snapshot to the staging account within the same Region.
🛠️ Lý do chi tiết:
- Default KMS key (
aws/rds) không cho phép share snapshot cross-account. Bước copy automated snapshot với custom KMS key (customer-managed key do bạn tạo) sẽ tạo snapshot mới có thể chia sẻ. - Sau đó, share cả copied snapshot và custom KMS key với tài khoản staging (sử dụng IAM policy trên KMS key cho phép
kms:Decryptcross-account). - Restore trong cùng Region để tránh phí cross-Region và đảm bảo tính tương thích (PostgreSQL Multi-AZ hỗ trợ tốt).
- Phương án này tuân thủ best practice AWS: Giữ nguyên tính toàn vẹn dữ liệu, không thay đổi DB instance gốc, và hỗ trợ Multi-AZ. Thời gian thực hiện nhanh (copy thường mất vài phút đến giờ tùy kích thước).
❌ Phân tích tất cả các phương án
Dưới đây là giải thích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh:
-
❌ Disable automated backups in the DB instance. Share both the automated snapshot and the default KMS key with the staging account. Restore the snapshot in the staging account and enable automated backups.
Phương án này sai vì: Disable automated backups chỉ dừng tạo snapshot mới, không giải quyết vấn đề mã hóa của snapshot hiện có (vẫn dùng default KMS key không share được). Việc share default KMS key cross-account bị cấm bởi AWS policy. Sau restore cũng không khắc phục gốc rễ, dẫn đến mất snapshot tự động lâu dài và rủi ro dữ liệu. -
✅ Copy the automated snapshot specifying a custom KMS encryption key. Share both the copied snapshot and the custom KMS encryption key with the staging account. Restore the snapshot to the staging account within the same Region.
Phương án này đúng như đã giải thích ở trên: Copy với custom KMS key là cách chuẩn để bypass hạn chế default key, share an toàn, và restore nhanh chóng trong cùng Region (hỗ trợ PostgreSQL Multi-AZ). -
❌ Modify the DB instance to use a custom KMS encryption key. Share both the automated snapshot and the custom KMS encryption key with the staging account. Restore the snapshot in the staging account.
Phương án này sai vì: Modify DB instance chỉ ảnh hưởng dữ liệu mới và snapshot tương lai (sau khi modify). Snapshot automated hiện có vẫn giữ default KMS key cũ, nên không share được. Phải restart DB instance (downtime ngắn), không cần thiết và không giải quyết snapshot ngay lập tức. -
❌ Copy the automated snapshot while keeping the default KMS key. Share both the snapshot and the default KMS key with the staging account. Restore the snapshot in the staging account.
Phương án này sai vì: Copy snapshot mà giữ nguyên default KMS key (aws/rds) vẫn không cho phép share cross-account (AWS không hỗ trợ share AWS-managed keys). Console vẫn disable option, dẫn đến thất bại.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS RDS User Guide: Sharing encrypted snapshots – Xác nhận chỉ custom KMS keys hỗ trợ cross-account sharing.
- AWS KMS Developer Guide: Sharing keys cross-account – Policy mẫu cho
kms:CreateGrant,kms:Decrypt. - AWS Well-Architected Framework (Reliability Pillar): Khuyến nghị copy snapshot với custom keys cho staging/prod data sharing.
- RDS for PostgreSQL docs: Hỗ trợ Multi-AZ snapshots từ version 15.x (2026 stable).
🛠️ Lời khuyên thực tế: Luôn test policy KMS trước khi share (sử dụng IAM Access Analyzer). Chi phí copy snapshot ~0.095 USD/GB/tháng (US East 2026 pricing). Nếu cross-Region, dùng DMS thay thế!
Which solution meets these requirements?
- A Use an AWS Lambda function to ship database logs to an Amazon S3 bucket. Use Amazon Athena and Amazon QuickSight to search and analyze the logs.
- B Download the logs from the DB cluster and store them in Amazon S3 by using manual scripts. Use Amazon Athena and Amazon QuickSight to search and analyze the logs.
- C Use an AWS Lambda function to ship database logs to an Amazon S3 bucket. Use Amazon Elasticsearch Service (Amazon ES) and Kibana to search and analyze the logs.
- D Use Amazon CloudWatch Logs Insights to search and analyze the logs when the logs are automatically uploaded by the DB cluster.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh một công ty SaaS sử dụng Amazon Aurora Serverless DB cluster làm cơ sở dữ liệu MySQL sản xuất, với general logs (nhật ký tổng quát) và slow query logs (nhật ký truy vấn chậm) đã được kích hoạt.
📌 Yêu cầu chính: Tìm giải pháp operationally efficient nhất (hiệu quả vận hành cao, ít công sức quản lý) và minimal resource utilization (tiêu tốn tài nguyên tối thiểu) để:
- Retain logs (lưu trữ lâu dài các log).
- Facilitate interactive search and analysis (hỗ trợ tìm kiếm và phân tích tương tác).
🛠️ Bối cảnh AWS cập nhật đến 2026: Aurora Serverless v2 (phiên bản mới nhất) hỗ trợ tự động publish logs (general, slow query, error) trực tiếp lên Amazon CloudWatch Logs mà không cần can thiệp thủ công hay Lambda. CloudWatch Logs Insights cho phép query tương tác nhanh chóng với ngôn ngữ query quen thuộc, tối ưu chi phí và tài nguyên so với các giải pháp tự xây dựng.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use Amazon CloudWatch Logs Insights to search and analyze the logs when the logs are automatically uploaded by the DB cluster.
Lý do chi tiết 🏆:
- Aurora Serverless tự động upload logs lên CloudWatch Logs Insights mà không cần code thêm, Lambda hay script – hoàn toàn serverless và automatic.
- CloudWatch Logs Insights hỗ trợ interactive search/analysis với query ngôn ngữ tự nhiên (ví dụ: filter slow queries bằng
fields @timestamp, query_time | filter query_time > 1), visualization realtime, và retention linh hoạt (mặc định 7 ngày, mở rộng đến 10 năm với chi phí thấp). - Operationally efficient & minimal resource: Zero provisioning, auto-scale, không tốn EC2/Lambda/ECS. Tiết kiệm 100% so với các giải pháp tự động hóa thủ công.
- Phù hợp production SaaS: High availability, integrated với AWS ecosystem.
📘 Tài liệu tham khảo:
- AWS Docs: Publishing Aurora MySQL logs to CloudWatch Logs (cập nhật 2024-2026, hỗ trợ Serverless v2).
- CloudWatch Logs Insights (query engine tối ưu cho DB logs).
🔍 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá dựa trên hiệu quả vận hành (operational efficiency) và tiêu thụ tài nguyên (resource utilization).
-
❌ [SAI] Use an AWS Lambda function to ship database logs to an Amazon S3 bucket. Use Amazon Athena and Amazon QuickSight to search and analyze the logs.
Lý do sai 🚫: Yêu cầu Lambda custom để poll/download logs từ Aurora rồi push sang S3 – tốn runtime, memory, và polling schedule (ví dụ: cron job mỗi 5 phút). Athena + QuickSight mạnh cho ad-hoc query nhưng không real-time/interactive như Insights (delay scan S3), và overkill cho logs DB (tăng chi phí scan dữ liệu). Không efficient so với auto-upload native. -
❌ [SAI] Download the logs from the DB cluster and store them in Amazon S3 by using manual scripts. Use Amazon Athena and Amazon QuickSight to search and analyze the logs.
Lý do sai 🚫: Manual scripts (chạy trên EC2 hay local) là non-automated, error-prone, yêu cầu human intervention định kỳ (RDS API calls nhưdownload-db-log-file-portion). Tốn nhân sự + tài nguyên máy chủ, không scalable cho production. Athena/QuickSight như trên: chậm và đắt cho interactive analysis. -
❌ [SAI] Use an AWS Lambda function to ship database logs to an Amazon S3 bucket. Use Amazon Elasticsearch Service (Amazon ES) and Kibana to search and analyze the logs.
Lý do sai 🚫: Tương tự lựa chọn 1, Lambda polling tốn tài nguyên không cần thiết. Amazon ES (nay là Amazon OpenSearch Service từ 2021-2026) + Kibana mạnh cho full-text search, nhưng phức tạp setup (domain provisioning, IAM, indexing pipeline), chi phí cao (instance-based), và không native với Aurora logs. Không minimal resource so với CloudWatch free-tier Insights. -
✅ [ĐÚNG] Use Amazon CloudWatch Logs Insights to search and analyze the logs when the logs are automatically uploaded by the DB cluster.
Xác nhận đúng 🥇: Như phần trên – tự động, zero-code, low-cost (chỉ tính phí query data scanned, ~$0.005/GB). Hỗ trợ live tailing, filters, patterns cho slow query analysis. Ideal cho DevOps engineer quản lý SaaS production.
Kết luận 🎯: Giải pháp đúng tận dụng native integration của AWS, giảm MTTR (mean time to resolution) và ops overhead xuống mức thấp nhất! Nếu implement, enable log exports qua RDS console/CLI: modify-db-cluster --cloudwatch-logs-export-configuration '{"EnableLogTypes":["general","slowquery"]}'.
Which solution will resolve this error?
- A Check file sizes of fact tables in Amazon S3, and look for large files. Break up large files into smaller files of equal size between 100 MB and 1 GB
- B Reduce the number of queries that users can run in parallel.
- C Check file sizes of fact tables in Amazon S3, and look for small files. Merge the small files into larger files of at least 64 MB in size.
- D Review and optimize queries that submit a large aggregation step to Redshift Spectrum.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một công ty bán lẻ sử dụng Amazon Redshift Spectrum để chạy các truy vấn phân tích phức tạp trên dữ liệu lưu trữ trong Amazon S3 bucket. Dữ liệu này (thường là fact tables) được join với nhiều bảng dimension trong cơ sở dữ liệu Amazon Redshift. Công ty dùng để tạo báo cáo tổng hợp hàng tháng và quý. Tuy nhiên, người dùng gặp lỗi: "error: Spectrum Scan Error: Access throttled".
🔍 Nguyên nhân cốt lõi: Lỗi này xảy ra do throttling (giới hạn truy cập) từ S3 khi Redshift Spectrum scan quá nhiều file nhỏ trong S3. Redshift Spectrum phải thực hiện hàng nghìn request GET/Object List đến S3 để đọc dữ liệu, dẫn đến vượt giới hạn throughput của S3 (S3 throttling). Điều này phổ biến với dữ liệu fact tables lớn được phân mảnh thành nhiều file nhỏ (small files problem), thường do quy trình ETL tạo ra.
🛠️ Mục tiêu giải pháp: Cần tối ưu hóa kích thước file trong S3 để giảm số lượng request, tránh throttling, đồng thời giữ hiệu suất truy vấn cao theo best practices AWS (cập nhật đến 2024-2026).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Check file sizes of fact tables in Amazon S3, and look for small files. Merge the small files into larger files of at least 64 MB in size.
Lý do (🧠 Phân tích sâu):
- Redshift Spectrum hoạt động tốt nhất khi file dữ liệu columnar (Parquet/ORC) có kích thước ít nhất 64 MB, lý tưởng là 128 MB - 1 GB (theo AWS best practices 2024). File nhỏ (<64 MB) gây ra quá nhiều request song song đến S3, dẫn đến lỗi "Access throttled".
- Giải pháp: Kiểm tra và merge small files thành file lớn hơn để giảm số lượng file, từ đó giảm request (từ hàng triệu xuống hàng nghìn), giải quyết throttling ngay lập tức.
- Hiệu quả cao với fact tables lớn trong S3, không ảnh hưởng đến dữ liệu Redshift nội bộ. Đây là khuyến nghị chính thức từ AWS cho Redshift Spectrum performance tuning.
📋 Giải thích tất cả các phương án (Đúng/Sai)
-
❌ SAI: Check file sizes of fact tables in Amazon S3, and look for large files. Break up large files into smaller files of equal size between 100 MB and 1 GB
Giải thích: Phương án này ngược lại hoàn toàn với vấn đề! File lớn (>1 GB) không gây throttling; throttling đến từ file nhỏ quá nhiều. Việc chia nhỏ file lớn sẽ tăng số lượng file, làm tình hình tệ hơn (tăng request S3). AWS khuyến nghị tránh file <64 MB, không phải chia nhỏ. -
❌ SAI: Reduce the number of queries that users can run in parallel.
Giải thích: Giảm query song song chỉ là giải pháp tạm thời (workload management qua WLM queues), không giải quyết gốc rễ throttling từ S3 scan. Vấn đề nằm ở file S3, không phải số lượng query. Nếu workload tăng, lỗi vẫn tái diễn. -
✅ ĐÚNG: Check file sizes of fact tables in Amazon S3, and look for small files. Merge the small files into larger files of at least 64 MB in size.
Giải thích: Như đã phân tích ở trên. Đây là best practice chuẩn từ AWS: Sử dụng công cụ như AWS Glue Job hoặc EMR để compact/merge files. Giảm 90%+ request, tăng performance 2-5x. Áp dụng ngay cho fact tables. -
❌ SAI: Review and optimize queries that submit a large aggregation step to Redshift Spectrum.
Giải thích: Tối ưu query (pushdown aggregation) giúp hiệu suất tổng thể, nhưng không giải quyết throttling S3. Lỗi "Spectrum Scan Error: Access throttled" xảy ra ở giai đoạn scan file S3 đầu tiên, trước aggregation. Query optimization chỉ giảm compute sau scan.
📘 Tài liệu tham khảo (Cập nhật AWS 2024-2026)
- AWS Documentation: Amazon Redshift Best Practices for Loading Data – Khuyến nghị file ≥64 MB cho Spectrum.
- Redshift Spectrum Performance: Tuning Query Performance – Explicitly đề cập small files gây throttling.
- S3 Throttling with Spectrum: Troubleshooting Spectrum Errors.
- Blog AWS: "Optimizing Redshift Spectrum for High Concurrency" (2023) – Case study merge files giảm throttling 95%.
- Exam Prep: AWS Certified Data Engineer/DevOps Engineer Professional (DOP-C02) – Chủ đề Spectrum optimization.
🛠️ Khuyến nghị thực tế: Sử dụng AWS Glue ETL hoặc Spark trên EMR để tự động compact files định kỳ. Theo dõi qua Redshift Query Editor V2 và S3 Storage Lens. Nếu workload lớn, cân nhắc Redshift Serverless cho auto-scale! 🚀
Which solution meets this requirement with the MOST operational efficiency?
- A Take a manual snapshot in the production account. Share the snapshot with the test account. Restore the database from the snapshot.
- B Take a manual snapshot in the production account. Export the snapshot to Amazon S3. Copy the snapshot to an S3 bucket in the test account. Restore the database from the snapshot.
- C Share the Aurora DB cluster with the test account. Create a snapshot of the production database in the test account. Restore the database from the snapshot.
- D Share the Aurora DB cluster with the test account. Create a clone of the production database in the test account.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào việc tối ưu hóa hoạt động (MOST operational efficiency) để sao chép cơ sở dữ liệu Amazon Aurora MySQL DB cluster từ tài khoản production sang tài khoản test, với tần suất 4 lần mỗi ngày.
- Công ty sử dụng các tài khoản AWS riêng biệt cho môi trường production, test và development.
- Mục tiêu: Dev team cần bản copy production DB để test tính năng mới ở test environment.
- Thách thức chính: Tần suất cao (4 lần/ngày) đòi hỏi giải pháp tự động hóa cao, nhanh chóng, ít thủ công, tránh downtime dài và chi phí vận hành lớn.
- Kiến thức AWS cập nhật 2026: Aurora MySQL hỗ trợ cloning (sao chép point-in-time nhanh, incremental, chỉ copy thay đổi), snapshot sharing cross-account qua AWS RAM (Resource Access Manager), và cross-account restore/clone để giảm thời gian từ hàng giờ xuống vài phút. Không cần export S3 vì chậm và phức tạp.
📘 Tài liệu tham khảo:
- Aurora Cloning (cập nhật 2025: hỗ trợ cross-account cloning từ shared snapshot).
- Sharing Snapshots Cross-Account.
- Aurora Best Practices.
✅ Đáp án đúng và lý do chọn
Đáp án đúng: Share the Aurora DB cluster with the test account. Create a clone của the production database in the test account.
Lý do:
- 🛠️ Hiệu quả vận hành cao nhất: Sharing cluster (thông qua snapshot hoặc RAM) cho phép test account clone trực tiếp – quá trình nhanh (vài phút), incremental (chỉ copy delta changes), không cần full restore. Phù hợp 4 lần/ngày mà không tốn nhiều tài nguyên.
- ✅ Tự động hóa dễ: Sử dụng AWS CLI/Lambda để automate sharing + cloning, giảm manual intervention.
- So với các option khác, tránh snapshot export/restore chậm (có thể 1-2 giờ cho DB lớn).
🔍 Phân tích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể bằng tiếng Việt:
-
❌ [SAI] Take a manual snapshot in the production account. Share the snapshot with the test account. Restore the database from the snapshot.
Lý do sai: Quá thủ công (manual snapshot), phải thực hiện 4 lần/ngày → dễ lỗi, tốn thời gian (restore mất 30p-2h tùy DB size). Không phải "MOST operational efficiency" vì thiếu automation và cloning nhanh. -
❌ [SAI] Take a manual snapshot in the production account. Export the snapshot to Amazon S3. Copy the snapshot to an S3 bucket in the test account. Restore the database from the snapshot.
Lý do sai: Chậm và phức tạp nhất – export snapshot sang S3 (dạng Parquet, mất hàng giờ), copy cross-account tốn phí transfer, restore lại lâu. Không phù hợp tần suất cao, tăng chi phí S3 + thời gian vận hành. -
❌ [SAI] Share the Aurora DB cluster with the test account. Create a snapshot of the production database in the test account. Restore the database from the snapshot.
Lý do sai: Không khả thi trực tiếp – Aurora DB cluster không share live để tạo snapshot ở account khác (chỉ share snapshot qua RAM). Phải tạo snapshot trước ở prod, share rồi restore → vẫn chậm hơn clone, cần full copy dữ liệu mỗi lần. -
✅ [ĐÚNG] Share the Aurora DB cluster with the test account. Create a clone of the production database in the test account.
Lý do đúng: Tối ưu nhất – Share cluster snapshot cross-account (qua AWS RAM), sau đó clone point-in-time ở test account: nhanh (instant cho small changes), không block production, hỗ trợ automation via EventBridge/Lambda. Hoàn hảo cho 4 lần/ngày với chi phí thấp.
🛡️ Lời khuyên DevOps: Automate bằng AWS Lambda + EventBridge (schedule 4x/day) để trigger share + clone. Monitor bằng CloudWatch. Test với small DB trước! 🚀
What should the database specialist do to meet these requirements?
- A Create a read replica of the DB instance. Configure the reports to connect to the replication instance endpoint.
- B Create a read replica of the DB instance. Configure the application and reports to connect to the cluster endpoint.
- C Enable Multi-AZ deployment. Configure the reports to connect to the standby replica.
- D Enable Multi-AZ deployment. Configure the application and reports to connect to the cluster endpoint.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một tình huống thực tế trong AWS RDS:
- Một ứng dụng đọc và ghi dữ liệu (read/write) vào một Amazon RDS for MySQL DB instance (instance chính).
- Một dashboard báo cáo mới cần quyền truy cập chỉ đọc (read-only) vào cơ sở dữ liệu.
- Khi tải nặng đồng thời từ ứng dụng và báo cáo, hiệu suất database bị suy giảm (performance degradation).
- Yêu cầu: Database specialist cần cải thiện hiệu suất (improve performance) mà vẫn đáp ứng nhu cầu read-only cho báo cáo, không ảnh hưởng đến ứng dụng chính.
🛠️ Vấn đề cốt lõi: Tải read từ báo cáo đang cạnh tranh tài nguyên với write từ ứng dụng trên cùng instance chính, gây nghẽn cổ chai (bottleneck). Giải pháp cần tách biệt read traffic để scale horizontally cho reads, theo best practices AWS RDS (cập nhật đến 2026: Read Replicas hỗ trợ lên đến 15 replicas per primary, với Multi-AZ async replication).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a read replica of the DB instance. Configure the reports to connect to the replication instance endpoint.
Lý do:
- Tạo read replica (bản sao đọc) từ instance chính RDS MySQL giúp offload read traffic từ báo cáo sang replica, giảm tải cho primary instance.
- Replica có endpoint riêng (replication instance endpoint), chỉ dùng cho reads (asynchronous replication), đảm bảo ứng dụng vẫn ghi vào primary mà không bị ảnh hưởng.
- Điều này cải thiện performance ngay lập tức dưới tải nặng, phù hợp với yêu cầu read-only. AWS khuyến nghị cho workload read-heavy (docs 2026 xác nhận replicas hỗ trợ global databases và performance insights).
📋 Giải thích tất cả các phương án (đúng/sai)
-
✅ Create a read replica of the DB instance. Configure the reports to connect to the replication instance endpoint.
Đúng vì: Như giải thích trên, read replica tách biệt read traffic hiệu quả. Endpoint replica dành riêng cho reports, primary giữ nguyên cho app write-heavy. 🏆 Best practice! -
❌ Create a read replica of the DB instance. Configure the application and reports to connect to the cluster endpoint.
Sai vì: RDS MySQL không có cluster endpoint (chỉ Aurora có writer/reader endpoints). Kết nối cả app và reports vào "cluster endpoint" sẽ không tồn tại, gây lỗi. Hơn nữa, app cần write vào primary, không nên dùng cluster endpoint giả định. -
❌ Enable Multi-AZ deployment. Configure the reports to connect to the standby replica.
Sai vì: Multi-AZ chỉ cung cấp high availability (HA) với standby synchronous replica cho failover, không expose endpoint công khai cho reads thường xuyên. Truy cập standby sẽ fail hoặc bị block, không scale reads và có thể trigger failover không mong muốn dưới tải nặng. -
❌ Enable Multi-AZ deployment. Configure the application and reports to connect to the cluster endpoint.
Sai vì: Tương tự, RDS MySQL Multi-AZ không có cluster endpoint. Multi-AZ chỉ failover tự động, không cải thiện performance read/write đồng thời; standby không dùng cho reads, dẫn đến degradation tiếp tục.
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- Read Replicas: AWS RDS User Guide - Read Replicas for MySQL – Chi tiết endpoint riêng, offload reads.
- Multi-AZ vs Read Replicas: RDS Best Practices – Multi-AZ cho HA, replicas cho scale reads.
- Performance Insights: RDS Performance – Xác nhận replicas giảm CPU/load dưới heavy read.
🛠️ Khuyến nghị thêm: Giám sát bằng CloudWatch + Performance Insights, scale instance nếu cần. Nếu workload lớn hơn, xem Aurora MySQL cho auto-scaling replicas! 🚀
Which solution meets these requirements?
- A Modify the default option group parameters to enable Advanced Auditing. Restart the database for the changes to take effect.
- B Create a custom DB cluster parameter group. Modify the parameters for Advanced Auditing. Modify the cluster to associate the new custom DB parameter group with the Aurora MySQL DB cluster.
- C Take a snapshot of the database. Create a new DB instance, and enable custom auditing and logging to CloudWatch. Deactivate the DB instance that has no logging.
- D Enable AWS CloudTrail for the DB instance. Create a filter that provides only connections, disconnections, queries, and tables queried.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS
📖 Nội dung câu hỏi được giải thích rõ ràng:
Câu hỏi tập trung vào việc kích hoạt audit logging nâng cao (Advanced Auditing) trên Amazon Aurora MySQL DB cluster để đáp ứng yêu cầu tuân thủ (compliance). Công ty đang tải dữ liệu nhạy cảm vào cơ sở dữ liệu này, nên cần ghi log chi tiết các hoạt động như: kết nối (connections), ngắt kết nối (disconnections), truy vấn (queries) và bảng được truy vấn (tables queried). Ngoài ra, log phải được publish trực tiếp đến Amazon CloudWatch để phân tích dữ liệu thời gian thực.
🛠️ Yêu cầu kỹ thuật chính:
- Sử dụng Advanced Auditing của Aurora MySQL (hỗ trợ từ version 2.04+).
- Log phải bao quát đầy đủ các sự kiện nội bộ DB (không phải API calls).
- Tích hợp CloudWatch Logs để theo dõi real-time (qua parameter
server_audit_logs_upload). - Áp dụng trên DB cluster (Aurora là clustered architecture, không phải single instance).
✅ Đáp án đúng: Create a custom DB cluster parameter group. Modify the parameters for Advanced Auditing. Modify the cluster to associate the new custom DB parameter group with the Aurora MySQL DB cluster.
Lý do chọn đáp án đúng (chi tiết):
🟢 Đây là quy trình chuẩn theo tài liệu AWS mới nhất (2024-2026):
- Aurora MySQL sử dụng DB cluster parameter group để cấu hình Advanced Auditing (parameters như
server_audit_logging = 1,server_audit_events = 'CONNECT,QUERY,TABLE',server_audit_logs_upload = 1để upload log lên CloudWatch). - Không được modify default parameter group (AWS khuyến cáo tạo custom để tránh ảnh hưởng cluster hiện tại).
- Sau khi tạo và modify custom group, associate với cluster (không cần restart thủ công vì Aurora hỗ trợ dynamic changes cho hầu hết params auditing). Log sẽ tự động publish đến CloudWatch Logs group tương ứng.
- Đáp ứng đầy đủ: Log events chính xác và real-time analysis.
🔍 Giải thích tất cả các phương án (đúng/sai)
-
❌ [SAI] Modify the default option group parameters to enable Advanced Auditing. Restart the database for the changes to take effect.
❌ Lý do sai:- Option group dùng cho các option như Transparent Data Encryption (TDE) hoặc Memcached, KHÔNG dùng cho Advanced Auditing trên Aurora MySQL (Auditing là parameter-based).
- Không được modify default parameter/option group vì có thể ảnh hưởng các cluster khác; AWS yêu cầu custom group.
- Restart DB không cần thiết và rủi ro downtime không đáng có. Không publish tự động đến CloudWatch.
-
✅ [ĐÚNG] Create a custom DB cluster parameter group. Modify the parameters for Advanced Auditing. Modify the cluster to associate the new custom DB parameter group with the Aurora MySQL DB cluster.
✅ Lý do đúng: (Như đã giải thích ở trên). Quy trình chính xác, an toàn, không downtime lớn, và tích hợp CloudWatch Logs hoàn hảo. -
❌ [SAI] Take a snapshot of the database. Create a new DB instance, and enable custom auditing and logging to CloudWatch. Deactivate the DB instance that has no logging.
❌ Lý do sai:- Aurora là DB cluster (multi-instance), không phải single DB instance; snapshot cluster tạo final snapshot, không dùng để tạo instance mới với auditing.
- "Deactivate" không phải thuật ngữ AWS chuẩn (là "delete" hoặc "stop"), và cách này gây downtime/migration phức tạp không cần thiết.
- Không hiệu quả cho cluster đang live, không leverage parameter group reuse.
-
❌ [SAI] Enable AWS CloudTrail for the DB instance. Create a filter that provides only connections, disconnections, queries, and tables queried.
❌ Lý do sai:- CloudTrail chỉ log API calls (như CreateDBInstance), KHÔNG log nội bộ DB activities như queries/tables (đó là việc của DB engine logging/Advanced Auditing).
- Không có filter cho DB-level events; CloudTrail dành cho control plane, không phải data plane.
- Aurora không phải "DB instance" đơn lẻ mà là cluster.
📘 Tài liệu tham khảo (AWS docs cập nhật 2024-2026)
- Advanced Auditing cho Aurora MySQL: Aurora MySQL Auditing – Chi tiết parameters và CloudWatch integration.
- Parameter Groups: Working with Parameter Groups – Khuyến cáo custom cluster parameter group.
- Publishing Logs to CloudWatch: Aurora Logs to CloudWatch.
- Best Practices DevOps: AWS Well-Architected Framework – Reliability pillar (tránh modify default groups).
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần thêm case studies, hỏi nhé!
SQL Server to Amazon RDS for SQL Server. The nightly native SQL Server backup file is approximately 120 GB in size. The application can be down for an extended period of time to complete the migration. Connectivity between the on-premises environment and AWS can be initiated from on-premises only.
How can the database be migrated from on-premises to Amazon RDS with the LEAST amount of effort?
- A Back up the SQL Server database using a native SQL Server backup. Upload the backup files to Amazon S3. Download the backup files on an Amazon EC2 instance and restore them from the EC2 instance into the new production RDS instance.
- B Back up the SQL Server database using a native SQL Server backup. Upload the backup files to Amazon S3. Restore the backup files from the S3 bucket into the new production RDS instance.
- C Provision and configure AWS DMS. Set up replication between the on-premises SQL Server environment to replicate the database to the new production RDS instance.
- D Back up the SQL Server database using AWS Backup. Once the backup is complete, restore the completed backup to an Amazon EC2 instance and move it to the new production RDS instance.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh việc di chuyển (migrate) một cơ sở dữ liệu Microsoft SQL Server on-premises với dung lượng 250 GB dữ liệu (file backup hàng đêm khoảng 120 GB) sang Amazon RDS for SQL Server. Các điều kiện quan trọng:
- Ứng dụng có thể downtime dài (thời gian ngừng hoạt động kéo dài để hoàn tất migration).
- Kết nối chỉ có thể khởi tạo từ on-premises ra AWS (không hỗ trợ kết nối ngược từ AWS về on-premises).
- Mục tiêu: Chọn phương pháp với ÍT NỖ LỰC NHẤT (LEAST amount of effort).
Đây là kịch bản migration full backup/restore thay vì live replication, vì downtime dài được chấp nhận và kết nối một chiều. AWS RDS for SQL Server hỗ trợ native backup restore trực tiếp từ Amazon S3 (tính năng ổn định từ lâu và cập nhật đến 2026, không thay đổi cơ bản). 📘 Tài liệu tham khảo: AWS RDS for SQL Server - Importing native backups và RDS User Guide - Native Backup and Restore.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Back up the SQL Server database using a native SQL Server backup. Upload the backup files to Amazon S3. Restore the backup files from the S3 bucket into the new production RDS instance.
Lý do 🛠️:
- Đây là quy trình đơn giản nhất, ít bước nhất: Backup native SQL Server → Upload lên S3 (từ on-premises) → Restore trực tiếp từ S3 vào RDS (RDS hỗ trợ tính năng này mà không cần trung gian).
- Phù hợp hoàn hảo với điều kiện: Downtime dài OK (full restore một lần), kết nối chỉ từ on-premises (upload S3 dễ dàng).
- Tiết kiệm effort: Không cần EC2, DMS hay công cụ khác; chỉ dùng tính năng built-in của RDS SQL Server (hỗ trợ .bak files từ SQL Server 2008+).
- Hiệu suất cao với file 120 GB nhờ S3 integration. ✅
📋 Giải thích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI: Back up the SQL Server database using a native SQL Server backup. Upload the backup files to Amazon S3. Download the backup files on an Amazon EC2 instance and restore them from the EC2 instance into the new production RDS instance.
Giải thích: Phương án này thêm bước thừa (download từ S3 xuống EC2 rồi restore từ EC2 sang RDS), làm tăng effort đáng kể (cần provision EC2, quản lý instance, network, IAM roles phức tạp hơn). RDS hỗ trợ restore trực tiếp từ S3 nên không cần EC2 trung gian → KHÔNG phải least effort. 🛑 -
✅ Phương án ĐÚNG: Back up the SQL Server database using a native SQL Server backup. Upload the backup files to Amazon S3. Restore the backup files from the S3 bucket into the new production RDS instance.
Giải thích: Như đã nêu ở phần đáp án đúng: Quy trình tối ưu, ít effort nhất với hỗ trợ native của RDS. Upload S3 từ on-premises dễ dàng, restore trực tiếp qua RDS console/API/CLI. Hoàn hảo cho kịch bản downtime dài và kết nối một chiều. 🚀 -
❌ Phương án SAI: Provision and configure AWS DMS. Set up replication between the on-premises SQL Server environment to replicate the database to the new production RDS instance.
Giải thích: AWS DMS (Database Migration Service) dùng cho ongoing replication (full load + CDC), yêu cầu DMS replication instance ở AWS và kết nối hai chiều (DMS cần truy cập on-premises source). Nhưng câu hỏi chỉ cho phép kết nối từ on-premises ra AWS, nên DMS không khả thi mà không dùng VPN/Direct Connect phức tạp. Hơn nữa, DMS nhiều effort hơn (setup endpoints, tasks, monitoring) so với simple backup/restore. Không phù hợp downtime dài. 📉 -
❌ Phương án SAI: Back up the SQL Server database using AWS Backup. Once the backup is complete, restore the completed backup to an Amazon EC2 instance and move it to the new production RDS instance.
Giải thích: AWS Backup không hỗ trợ native backup SQL Server on-premises (AWS Backup chủ yếu cho AWS-native resources như EC2/RDS/EFS; không có agent cho on-premises SQL Server trực tiếp). Phải dùng EC2 trung gian (tương tự phương án đầu), rồi "move" sang RDS → effort cao, không native, và sai về tính khả dụng. AWS Backup vault restore không trực tiếp apply cho RDS SQL Server migration kiểu này. 🚫
Kết luận 🌟: Phương án đúng tận dụng tối đa tính năng RDS native backup restore từ S3, đảm bảo least effort theo best practices AWS DevOps (2026). Nên test IAM policies cho S3 access và kích hoạt option group nếu cần multi-file backups! 🧪
What is the MOST likely reason that the items are not being deleted?
- A The TTL attribute's value is set as a Number data type.
- B The TTL attribute's value is set as a Binary data type.
- C The TTL attribute's value is a timestamp in the Unix epoch time format in seconds.
- D The TTL attribute's value is set with an expiration of 1 year.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS DynamoDB TTL
📖 Giải thích nội dung câu hỏi:
Câu hỏi mô tả tình huống một database specialist cần tự động xóa dữ liệu người dùng (user data) và dữ liệu cảm biến (sensor data) sau 1 năm kể từ khi được tải vào bảng Amazon DynamoDB. Họ đã kích hoạt tính năng TTL (Time to Live) trên một thuộc tính (attribute) cụ thể. Tuy nhiên, khi theo dõi TTL rates qua Amazon CloudWatch metrics của bảng, họ nhận thấy các item không bị xóa như kỳ vọng.
🛠️ Vấn đề cốt lõi: TTL trong DynamoDB là cơ chế tự động xóa item dựa trên giá trị timestamp trong một attribute được chỉ định. Nếu không hoạt động, nguyên nhân thường liên quan đến định dạng dữ liệu của attribute TTL hoặc giá trị của nó. Câu hỏi yêu cầu tìm MOST likely reason (nguyên nhân có khả năng nhất) khiến items không expire.
✅ Kiến thức nền tảng (cập nhật đến 2026): Theo tài liệu AWS mới nhất, TTL yêu cầu attribute phải là kiểu Number, giá trị là Unix epoch timestamp (giây) đại diện thời điểm expire trong tương lai. DynamoDB không xử lý TTL nếu attribute sai kiểu dữ liệu. Items hết hạn sẽ bị xóa ngầm (không đảm bảo thời gian chính xác, thường trong 48 giờ), và CloudWatch metric TTLDeletes sẽ hiển thị số lượng xóa nếu thành công.
✅ Đáp án đúng:
The TTL attribute's value is set as a Binary data type.
Lý do lựa chọn: Đây là nguyên nhân có khả năng nhất vì DynamoDB chỉ hỗ trợ TTL attribute kiểu Number (số nguyên đại diện Unix epoch time ở giây). Nếu attribute là Binary (B), DynamoDB sẽ bỏ qua hoàn toàn việc xử lý TTL, dẫn đến TTL rates = 0 trên CloudWatch. Không có cảnh báo, chỉ đơn giản là không xóa. Điều này khớp chính xác với triệu chứng quan sát được.
🔍 Giải thích tất cả các phương án (đúng/sai):
-
❌ Phương án SAI: The TTL attribute's value is set as a Number data type.
Giải thích: Đây là kiểu dữ liệu đúng theo yêu cầu của AWS. Attribute TTL phải là Number (số nguyên 64-bit) để DynamoDB có thể đọc và so sánh timestamp. Nếu dùng Number, TTL sẽ hoạt động bình thường (giả sử giá trị hợp lệ), nên không phải nguyên nhân khiến items không xóa. -
✅ Phương án ĐÚNG: The TTL attribute's value is set as a Binary data type.
Giải thích: Binary (B) không được hỗ trợ cho TTL attribute. DynamoDB chỉ chấp nhận Number; các kiểu khác như String (S), Binary (B) hoặc khác sẽ bị bỏ qua, TTL rates trên CloudWatch = 0, items không expire. Đây là lỗi phổ biến nhất trong thực tế, khớp triệu chứng "không xóa như expected". -
❌ Phương án SAI: The TTL attribute's value is a timestamp in the Unix epoch time format in seconds.
Giải thích: Đây là định dạng chuẩn của AWS: Giá trị Number phải là Unix epoch time (giây từ 1970-01-01), và phải lớn hơn thời điểm hiện tại (tương lai). Ví dụ: Để expire sau 1 năm, giá trị = current_time + 31_536_000 giây. Định dạng này đúng, không gây lỗi xóa. -
❌ Phương án SAI: The TTL attribute's value is set with an expiration of 1 year.
Giải thích: Giá trị expire 1 năm sau là hoàn toàn hợp lệ và đúng yêu cầu câu hỏi (xóa sau 1 năm). Chỉ cần tính toán timestamp tương lai chính xác (current Unix time + 365243600 giây), DynamoDB sẽ tự động xóa. Không phải vấn đề nếu kiểu dữ liệu đúng.
📘 Tài liệu tham khảo (AWS cập nhật 2026):
- Amazon DynamoDB TTL Documentation – Chi tiết yêu cầu Number type và Unix epoch seconds.
- CloudWatch Metrics for DynamoDB – Giải thích TTLDeletes/TimeToLiveDeletedItemCount.
- DynamoDB Developer Guide - TTL Concepts – Xác nhận chỉ Number được hỗ trợ, không Binary/String.
🛠️ Lời khuyên thực hành: Kiểm tra schema bảng qua AWS Console/CLI (describe-table), đảm bảo TTL attribute là Number và enable qua update-time-to-live. Test với item nhỏ để verify TTL rates!
8XL-sized instance, and the read replicas are each XL-sized instances.
Users report that database queries are returning stale data. The replication lag indicates that the replicas are 5 minutes behind the primary DB instance. Status queries on the replicas show that the SQL_THREAD is 10 binlogs behind the IO_THREAD and that the IO_THREAD is 1 binlog behind the primary.
Which changes will reduce the lag? (Choose two.)
- A Deploy two additional read replicas matching the existing replica DB instance size.
- B Migrate the primary DB instance to an Amazon Aurora MySQL DB cluster and add three Aurora Replicas.
- C Move the read replicas to the same Availability Zone as the primary DB instance.
- D Increase the instance size of the primary DB instance within the same instance class.
- E Increase the instance size of the read replicas to the same size and class as the primary DB instance.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh vấn đề replication lag (độ trễ sao chép) trong một cụm cơ sở dữ liệu Amazon RDS for MySQL sử dụng 3 read replicas. Cụ thể:
- Primary DB instance: Kích thước 8XL (rất lớn, CPU/RAM cao).
- Read replicas: Mỗi cái kích thước XL (nhỏ hơn primary nhiều).
- Triệu chứng:
- Queries từ users trả về stale data (dữ liệu cũ).
- Replication lag: 5 phút (replicas chậm primary).
- Trên replicas: SQL_THREAD chậm IO_THREAD 10 binlogs, IO_THREAD chậm primary 1 binlog.
- Nguyên nhân chính (dựa trên kiến thức AWS RDS MySQL replication - cập nhật đến 2026):
- IO_THREAD: Đọc binlogs từ primary (chậm nhẹ do network/latency ~1 binlog).
- SQL_THREAD: Áp dụng (apply) binlogs vào replica (chậm lớn ~10 binlogs do replicas yếu CPU/IO/memory so với primary).
- Primary mạnh → sinh binlogs nhanh. Replicas yếu → apply chậm → lag tích tụ.
- Yêu cầu: Chọn 2 thay đổi để giảm lag. (Multi-choice, chọn 2 đúng).
📘 Tài liệu tham khảo:
- AWS RDS MySQL Replication: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_MySQL.Replication.ReadReplicas.html (cập nhật 2025: nhấn mạnh bottleneck SQL_THREAD do instance size).
- Aurora vs RDS: https://aws.amazon.com/rds/aurora/ (Aurora replicas lag <1s nhờ shared storage).
- Monitoring Replication Lag: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/monitoring-cloudwatch.html#replication-lag-metrics.
✅ Đáp án đúng (Chọn 2)
Các phương án đúng là những thay đổi trực tiếp giải quyết bottleneck SQL_THREAD và cải thiện hiệu suất replication tổng thể:
-
Migrate the primary DB instance to an Amazon Aurora MySQL DB cluster and add three Aurora Replicas.
✅ Lý do: Chuyển sang Aurora MySQL sử dụng shared storage architecture (không copy toàn bộ data như RDS replicas). Replication async nhưng lag cực thấp (<1 giây) nhờ replicas đọc trực tiếp từ shared volume. Giải quyết hoàn toàn lag 5 phút. Primary 8XL tương đương Aurora cluster mạnh, replicas tự scale. (Phiên bản Aurora 3.10+ 2026 hỗ trợ MySQL 8.0 với lag sub-ms). -
Increase the instance size of the read replicas to the same size and class as the primary DB instance.
✅ Lý do: Replicas XL yếu → SQL_THREAD chậm apply binlogs (10 binlogs lag). Tăng lên 8XL (CPU/RAM/IO cao hơn 8x) → replicas apply binlogs nhanh như primary, giảm lag ngay. MetricReplicaLagsẽ drop nhanh (AWS best practice: match instance size primary-replica).
❌ Phân tích tất cả các phương án (Đúng/Sai)
Dưới đây là giải thích chi tiết từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh:
-
Deploy two additional read replicas matching the existing replica DB instance size.
❌ Sai: Thêm 2 replicas XL nữa chỉ tăng số lượng read traffic, không giảm lag hiện tại (vì replicas yếu vẫn lag). Load phân tán nhưng bottleneck SQL_THREAD trên tất cả replicas vẫn y nguyên → lag không giảm, có thể tệ hơn do primary chịu áp lực binlog cao hơn. -
Migrate the primary DB instance to an Amazon Aurora MySQL DB cluster and add three Aurora Replicas.
✅ Đúng: Như giải thích trên. 🛠️ Shared storage loại bỏ copy data lag, SQL apply siêu nhanh. Best practice AWS cho high-throughput workloads (2026: Aurora Serverless v3 hỗ trợ auto-scale replicas zero-lag). -
Move the read replicas to the same Availability Zone as the primary DB instance.
❌ Sai: Giảm network latency cho IO_THREAD (1 binlog lag) nhẹ, nhưng SQL_THREAD lag 10 binlogs do compute yếu (CPU/IO) không cải thiện. Cross-AZ latency ~1-2ms, không đủ bù đắp bottleneck apply. (AWS docs: AZ placement chỉ ảnh hưởng IO nhẹ). -
Increase the instance size of the primary DB instance within the same instance class.
❌ Sai: Primary 8XL đã lớn, tăng size same class (ví dụ 12XL) làm primary nhanh hơn → sinh binlogs to/nhanh hơn, replicas XL càng lag nhiều (tích tụ nhanh). Không giải quyết bottleneck replicas. -
Increase the instance size of the read replicas to the same size and class as the primary DB instance.
✅ Đúng: Như giải thích trên. 🧩 Trực tiếp fix SQL_THREAD: Replicas 8XL → throughput apply = primary → lag → 0. Monitor qua CloudWatchReplicaLagđể verify.
Kết luận: Hai thay đổi đúng tập trung scale replicas và upgrade architecture (Aurora). Áp dụng ngay để resolve stale data! 🚀 Nếu thực tế, dùng DMS cho migration Aurora zero-downtime.
Which step can be taken to ensure that the application is not interrupted?
- A Disable weekly maintenance on the DB cluster.
- B Clone the DB cluster and migrate it to a new copy of the database.
- C Choose to defer the upgrade and then find an appropriate down time for patching.
- D Set up an Aurora Replica and promote it to primary at the time of patching.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh tình huống một công ty sử dụng Amazon Aurora MySQL làm cơ sở dữ liệu cho ứng dụng bán lẻ trên AWS. Họ nhận được thông báo về nâng cấp database sắp diễn ra (pending database upgrade), và muốn tránh nâng cấp này xảy ra trước hoặc trong thời gian cao điểm nhất trong năm (most critical time of year). Lãnh đạo công ty lo ngại rằng cửa sổ bảo trì Amazon RDS (maintenance window) sẽ gây ngừng dịch vụ (outage) trong quá trình ingestion dữ liệu (data ingestion).
Mục tiêu chính: Tìm bước hành động để đảm bảo ứng dụng không bị gián đoạn (application is not interrupted).
🛠️ Bối cảnh kỹ thuật: Với Aurora MySQL (phiên bản mới nhất đến 2026), AWS thường thông báo trước về major version upgrades hoặc maintenance actions. Cửa sổ bảo trì mặc định là 30 phút/tuần, nhưng có thể tùy chỉnh. Aurora hỗ trợ defer upgrades để tránh downtime không mong muốn, đặc biệt trong môi trường production cao tải như retail.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Choose to defer the upgrade and then find an appropriate down time for patching.
Lý do chi tiết:
- AWS cho phép defer (hoãn) major version upgrades trên Aurora DB clusters/clusters một cách chủ động qua AWS Management Console, CLI hoặc API (sử dụng
ModifyDBClustervớiEngineVersionpending và optionApplyImmediately=false). - Thời gian defer tối đa lên đến hàng tháng (thường 3-6 tháng tùy phiên bản, cập nhật 2026 vẫn giữ cơ chế này để tránh forced upgrades).
- Sau khi defer, công ty có thể chọn thời gian downtime phù hợp (appropriate down time) để patching, tránh cao điểm và data ingestion. Quá trình upgrade chỉ gây downtime ngắn (thường <5 phút cho Aurora multi-AZ).
- Đây là best practice từ AWS để kiểm soát maintenance, đảm bảo zero unplanned outage.
📘 Nguồn tham khảo: - AWS Docs: Upgrading the Aurora DB cluster engine version (cập nhật 2026: Hỗ trợ defer cho MySQL 8.0+ và 3.x).
- AWS RDS Maintenance Documentation.
🔍 Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên tính khả thi, best practice và hành vi thực tế của Aurora MySQL (phiên bản mới nhất 2026).
-
❌ [SAI] Disable weekly maintenance on the DB cluster.
Giải thích sai: Không thể tắt hoàn toàn (disable) weekly maintenance trên Aurora DB cluster. AWS yêu cầu bảo trì định kỳ để đảm bảo security và stability. Bạn chỉ có thể modify maintenance window (thay đổi thời gian), nhưng pending upgrades (major versions) vẫn phải thực hiện. Việc cố disable sẽ bị AWS từ chối, dẫn đến forced action và outage không kiểm soát. 🛑 Không phải giải pháp bền vững. -
❌ [SAI] Clone the DB cluster and migrate it to a new copy of the database.
Giải thích sai: Clone DB cluster tạo snapshot point-in-time, nhưng clone mới vẫn kế thừa pending upgrade từ parent cluster (AWS propagate maintenance actions). Việc migrate sang clone mới không tránh được upgrade và gây downtime dài do cutover traffic, sync data. Không phù hợp cho high-availability retail app, vì phức tạp và rủi ro data loss nếu không sync đúng. 🚫 Không giải quyết gốc rễ thông báo pending. -
✅ [ĐÚNG] Choose to defer the upgrade and then find an appropriate down time for patching.
Giải thích đúng: Như đã phân tích ở phần trên, đây là cách trực tiếp và hiệu quả nhất. Defer cho phép lên lịch patching vào low-traffic window, Aurora tự handle failover với RTO <120 giây (multi-AZ). Hoàn hảo cho scenario tránh outage trong data ingestion. ⭐ Best practice DevOps. -
❌ [SAI] Set up an Aurora Replica and promote it to primary at the time of patching.
Giải thích sai: Aurora Replica (read replica) có thể promote thành primary qua failover, nhưng replica cũng inherit pending upgrade từ cluster. Khi patching primary cũ, replica vẫn cần upgrade sau, gây downtime kép và failover lag (có thể >30 giây). Không tránh được maintenance window gốc, và phức tạp hơn defer đơn giản. ⚠️ Rủi ro consistency trong retail data-heavy workload.
🏆 Kết luận và khuyến nghị DevOps
✅ Chọn defer upgrade là giải pháp an toàn, ít can thiệp nhất, phù hợp chứng chỉ AWS Certified DevOps Engineer Professional (Domain 4: Automation & Optimization).
🛠️ Khuyến nghị thêm: Kết hợp Aurora Global Database hoặc RDS Proxy cho zero-downtime tương lai; monitor qua CloudWatch Events cho pending notifications. Theo dõi AWS re:Post hoặc Well-Architected Framework cho updates 2026!