Ngân hàng đề — AWS Certified Database Specialty

Tìm thấy 358 câu.

Câu 81
A company is running Amazon RDS for MySQL for its workloads. There is downtime when AWS operating system patches are applied during the Amazon RDS- specified maintenance window.
What is the MOST cost-effective action that should be taken to avoid downtime?
  1. A Migrate the workloads from Amazon RDS for MySQL to Amazon DynamoDB
  2. B Enable cross-Region read replicas and direct read traffic to them when Amazon RDS is down
  3. C Enable a read replica and direct read traffic to it when Amazon RDS is down
  4. D Enable an Amazon RDS for MySQL Multi-AZ configuration
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

📘 Nội dung câu hỏi:
Câu hỏi tập trung vào vấn đề downtime (thời gian ngừng hoạt động) xảy ra khi AWS áp dụng các bản vá (patches) cho hệ điều hành trên Amazon RDS for MySQL trong cửa sổ bảo trì (maintenance window) do AWS quy định. Công ty đang sử dụng RDS MySQL cho các workload (tải công việc), và mục tiêu là tìm hành động tiết kiệm chi phí nhất (MOST cost-effective) để tránh hoàn toàn downtime.

🛠️ Bối cảnh kỹ thuật:

  • RDS là dịch vụ quản lý cơ sở dữ liệu quan hệ (relational DB), và maintenance window là khoảng thời gian định kỳ (mặc định 30 phút/tuần) để AWS cập nhật phần mềm/OS mà không cần can thiệp thủ công.
  • Với cấu hình Single-AZ (một Availability Zone), primary instance sẽ bị tạm dừng, gây downtime cho cả đọc (read) và ghi (write).
  • Giải pháp cần đảm bảo high availability (HA), ưu tiên chi phí thấp, không thay đổi lớn kiến trúc ứng dụng, và áp dụng kiến thức AWS mới nhất đến 2026 (RDS hỗ trợ Multi-AZ với failover tự động dưới 120 giây, cải tiến với Multi-AZ DB clusters cho MySQL 8.0+).

✅ Đáp án đúng: Enable an Amazon RDS for MySQL Multi-AZ configuration

Lý do lựa chọn (chi tiết):
🔥 Multi-AZ kích hoạt một standby instance ở AZ khác, đồng bộ dữ liệu liên tục (synchronous replication). Khi maintenance window xảy ra:

  • AWS tự động failover sang standby (thời gian <2 phút, thường <60 giây).
  • Không downtime cho read/write, DNS endpoint tự động cập nhật.
  • Cost-effective nhất: Chỉ tăng chi phí ~gấp đôi (standby idle, không tính storage riêng), không cần code thay đổi, hỗ trợ MySQL đầy đủ.
  • Theo AWS 2026: Multi-AZ là tiêu chuẩn HA cho RDS, ưu tiên hơn read replicas vì xử lý cả read/write.

❌ Phân tích tất cả các phương án

  • Migrate the workloads from Amazon RDS for MySQL to Amazon DynamoDB
    ❌ Sai vì: Chuyển sang DynamoDB (NoSQL) yêu cầu refactor toàn bộ ứng dụng (từ SQL sang key-value/NoSQL), tốn kém cao (migration tool như DMS + dev time). Không giải quyết downtime RDS mà tạo vấn đề mới (DynamoDB không tương thích MySQL queries). Không cost-effective, chỉ dùng nếu workload phù hợp NoSQL.

  • Enable cross-Region read replicas and direct read traffic to them when Amazon RDS is down
    ❌ Sai vì: Cross-Region replicas chỉ read-only, không xử lý write khi primary down. Traffic phải chuyển thủ công (app logic), gây downtime write và latency cao (cross-Region). Chi phí đắt (data transfer + 2 regions), không tự động failover. AWS khuyến cáo chỉ cho disaster recovery, không phải maintenance.

  • Enable a read replica and direct read traffic to it when Amazon RDS is down
    ❌ Sai vì: Read replica (same-Region) chỉ read-only, primary down vẫn mất write. Phải chuyển traffic thủ công/promote replica (downtime ~phút), không tự động như Multi-AZ. Chi phí thấp hơn Multi-AZ nhưng không tránh downtime hoàn toàn (read OK nhưng write fail).

  • Enable an Amazon RDS for MySQL Multi-AZ configuration
    ✅ Đúng vì: Như giải thích trên, failover tự động, zero-downtime cho maintenance, cost-effective (chỉ +1 instance). Hoàn hảo cho workload MySQL hiện tại.

📚 Tài liệu tham khảo (AWS cập nhật 2026)

  • AWS RDS User Guide: High Availability (Multi-AZ) – Chi tiết failover và maintenance.
  • AWS Best Practices: RDS Maintenance – Khuyến cáo Multi-AZ tránh downtime.
  • AWS Well-Architected Framework (Reliability Pillar): Ưu tiên Multi-AZ cho production RDS.
  • RDS Release Notes 2023-2026: Cải tiến Multi-AZ với faster failover và MySQL 8.0+ support.

🛠️ Khuyến nghị DevOps: Kết hợp CloudWatch alarms theo dõi maintenance + Auto Scaling cho HA tối ưu!

Câu 82
A Database Specialist must create a read replica to isolate read-only queries for an Amazon RDS for MySQL DB instance. Immediately after creating the read replica, users that query it report slow response times.
What could be causing these slow response times?
  1. A New volumes created from snapshots load lazily in the background
  2. B Long-running statements on the master
  3. C Insufficient resources on the master
  4. D Overload of a single replication thread by excessive writes on the master
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào tình huống một Database Specialist tạo read replica cho Amazon RDS for MySQL DB instance nhằm tách biệt các truy vấn chỉ đọc (read-only queries). Ngay sau khi tạo read replica, người dùng truy vấn replica báo cáo thời gian phản hồi chậm (slow response times).
📌 Mục tiêu câu hỏi: Xác định nguyên nhân chính gây chậm ngay lập tức sau khi tạo replica. Đây là vấn đề phổ biến liên quan đến cơ chế khởi tạo read replica trong RDS MySQL, nơi replica được tạo từ snapshot của primary instance (master) và sử dụng EBS volumes với hành vi lazy loading (tải dữ liệu lười biếng).

✅ Đáp án đúng

New volumes created from snapshots load lazily in the background
Lý do chọn đáp án này:
Khi tạo read replica cho RDS MySQL, AWS tạo một EBS volume mới từ snapshot của master. Theo thiết kế của EBS (Amazon Elastic Block Store), các volume từ snapshot không được tải đầy đủ dữ liệu ngay lập tức mà sử dụng cơ chế lazy loading: dữ liệu chỉ được tải từ backend S3 on-demand (khi truy vấn lần đầu). Điều này dẫn đến I/O cao và latency lớn ngay sau tạo replica, cho đến khi toàn bộ volume được "warm up" (thường mất vài giờ đến ngày, tùy kích thước). Đây chính là nguyên nhân ngay lập tức gây slow response times trên replica.
🛠️ Giải pháp khuyến nghị: Chờ volume fully populated (kiểm tra qua CloudWatch metrics như VolumeBytesUsed), hoặc scale up instance để tăng IOPS tạm thời.

❌ Giải thích tất cả các phương án

  • New volumes created from snapshots load lazily in the background
    ✅ Đúng – Như giải thích trên, đây là nguyên nhân cốt lõi do lazy loading của EBS snapshots. RDS read replicas kế thừa hành vi này từ EBS, gây chậm truy vấn ban đầu trên replica (không ảnh hưởng master).

  • Long-running statements on the master
    ❌ Sai – Các câu lệnh dài trên master có thể gây replication lag (trì hoãn sao chép), nhưng không gây chậm ngay lập tức trên replica mới. Replica chỉ chậm do lazy loading dữ liệu hiện có; replication chỉ sync thay đổi sau.

  • Insufficient resources on the master
    ❌ Sai – Tài nguyên master thiếu (CPU/RAM thấp) ảnh hưởng đến replication throughput, dẫn đến lag lâu dài, chứ không phải chậm truy vấn ngay trên replica mới. Replica có tài nguyên riêng, độc lập với master.

  • Overload of a single replication thread by excessive writes on the master
    ❌ Sai – MySQL RDS dùng single-threaded replication (một luồng sao chép), overload do writes cao gây replication lag tích tụ, nhưng vấn đề này xuất hiện sau một thời gian, không phải ngay sau tạo replica. Slow ban đầu vẫn do lazy loading.

📘 Tài liệu tham khảo (cập nhật AWS 2026)

  • AWS RDS User Guide: Read Replicas for MySQL – Mô tả tạo replica từ snapshot và lưu ý performance ban đầu.
  • Amazon EBS Documentation: Snapshots and Lazy Loading – Chi tiết lazy loading volumes từ snapshot (áp dụng cho RDS volumes).
  • CloudWatch Metrics for RDS: Theo dõi ReplicaLag, VolumeBytesUsed để debug (AWS re:Post và Best Practices 2025-2026).
  • AWS Exam DOP-C02 Blueprint: Domain 3.1 – RDS automation & troubleshooting (phiên bản mới nhất 2026).

🧠 Mẹo thi chứng chỉ: Luôn ưu tiên cơ chế "lazy" của AWS storage khi gặp vấn đề performance ngay sau tạo từ snapshot!

Câu 83
A company developed an AWS CloudFormation template used to create all new Amazon DynamoDB tables in its AWS account. The template configures provisioned throughput capacity using hard-coded values. The company wants to change the template so that the tables it creates in the future have independently configurable read and write capacity units assigned.
Which solution will enable this change?
  1. A Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Configure DynamoDB to provision throughput capacity using the stack's mappings.
  2. B Add values for two Number parameters, rcuCount and wcuCount, to the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
  3. C Add values for the rcuCount and wcuCount parameters as outputs of the template. Configure DynamoDB to provision throughput capacity using the stack outputs.
  4. D Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi xoay quanh việc tùy chỉnh template AWS CloudFormation để tạo các bảng Amazon DynamoDB mới trong tài khoản AWS. Hiện tại, template đang sử dụng giá trị hard-coded (cố định) cho provisioned throughput capacity (sức chứa được cung cấp), bao gồm read capacity units (RCU - đơn vị đọc) và write capacity units (WCU - đơn vị ghi).

Công ty muốn thay đổi template sao cho các bảng DynamoDB được tạo trong tương lai có thể cấu hình độc lập giá trị RCU và WCU (tức là người dùng có thể truyền tham số khác nhau mỗi khi deploy stack, mà không cần chỉnh sửa template).

Mục tiêu chính: Làm cho template linh hoạt hơn bằng cách hỗ trợ input động thay vì hard-code, phù hợp với best practice của AWS CloudFormation (theo tài liệu cập nhật 2024-2026). Điều này giúp tái sử dụng template cho nhiều môi trường (dev/staging/prod) với throughput khác nhau.

Resource liên quan: Trong CloudFormation, DynamoDB table sử dụng thuộc tính ProvisionedThroughput với ReadCapacityUnits và WriteCapacityUnits (xem AWS::DynamoDB::Table).


✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng:
Add values for two Number parameters, rcuCount and wcuCount, to the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.

Lý do chọn đáp án này 🛠️:

  • Parameters trong CloudFormation cho phép người dùng truyền giá trị động khi tạo stack (qua AWS Console, CLI hoặc CI/CD). Kiểu Number phù hợp cho RCU/WCU (phải là số nguyên dương).
  • Sử dụng hàm Ref (ví dụ: !Ref rcuCount) để thay thế hard-coded values trong resource DynamoDB, giúp template linh hoạt và độc lập config RCU/WCU cho từng lần deploy.
  • Đây là best practice chuẩn của AWS, hỗ trợ autoscaling và on-demand mode (cập nhật DynamoDB 2024+), không yêu cầu chỉnh template.
  • Kết quả: Stack deploy với throughput tùy chỉnh, ví dụ aws cloudformation create-stack --parameters ParameterKey=rcuCount,ParameterValue=10.

📋 Giải thích tất cả các phương án (đúng/sai)

Dưới đây là phân tích chi tiết 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 cách hoạt động của CloudFormation (Parameters, Mappings, Outputs, Ref/Intrinsic Functions) theo docs AWS mới nhất (2026).

  • ❌ Phương án SAI:
    Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Configure DynamoDB to provision throughput capacity using the stack's mappings.
    Giải thích sai: Mappings dùng để ánh xạ giá trị tĩnh dựa trên Region/Key (như config khác nhau theo môi trường), KHÔNG phải input động từ user. Thêm "parameters" vào Mappings chỉ là giá trị hard-code gián tiếp, không cho phép config độc lập khi deploy stack. Không linh hoạt, vi phạm yêu cầu "independently configurable".

  • ✅ Phương án ĐÚNG (như đã giải thích ở trên):
    Add values for two Number parameters, rcuCount and wcuCount, to the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
    Giải thích đúng: Hoàn hảo khớp yêu cầu, sử dụng Parameters + Ref để input động, thay thế hard-code trực tiếp trong ProvisionedThroughput.

  • ❌ Phương án SAI:
    Add values for the rcuCount and wcuCount parameters as outputs of the template. Configure DynamoDB to provision throughput capacity using the stack outputs.
    Giải thích sai: Outputs chỉ xuất giá trị SAU khi stack tạo xong (để tham chiếu cross-stack), KHÔNG dùng để config resource TRONG stack. DynamoDB cần throughput lúc tạo resource, không thể dùng Outputs (circular dependency). Hoàn toàn không khả thi.

  • ❌ Phương án SAI:
    Add values for the rcuCount and wcuCount parameters to the Mappings section of the template. Replace the hard-coded values with calls to the Ref intrinsic function, referencing the new parameters.
    Giải thích sai: Ref chỉ dùng cho Parameters, không áp dụng cho Mappings (Mappings dùng Fn::FindInMap). Thêm vào Mappings rồi Ref sẽ lỗi syntax khi validate template. Kết hợp sai khái niệm, không hoạt động.


📘 Tài liệu tham khảo (AWS cập nhật mới nhất 2024-2026)

  • AWS CloudFormation User Guide: Parameters & Intrinsic Functions (Ref).
  • AWS::DynamoDB::Table: ProvisionedThroughput.
  • Best Practices: AWS Well-Architected Framework - Reliability Pillar (sử dụng parameters cho config động).
  • Exam Tips (DOP-C02): Câu hỏi kiểu này kiểm tra hiểu Parameters vs Mappings/Outputs, thường gặp trong DevOps Professional.

💡 Lời khuyên: Khi deploy thực tế, kết hợp với DynamoDB Auto Scaling hoặc On-Demand để tối ưu chi phí thay vì provisioned hard-code! 🚀

Câu 84
A retail company with its main office in New York and another office in Tokyo plans to build a database solution on AWS. The company's main workload consists of a mission-critical application that updates its application data in a data store. The team at the Tokyo office is building dashboards with complex analytical queries using the application data. The dashboards will be used to make buying decisions, so they need to have access to the application data in less than 1 second.
Which solution meets these requirements?
  1. A Use an Amazon RDS DB instance deployed in the us-east-1 Region with a read replica instance in the ap-northeast-1 Region. Create an Amazon ElastiCache cluster in the ap-northeast-1 Region to cache application data from the replica to generate the dashboards.
  2. B Use an Amazon DynamoDB global table in the us-east-1 Region with replication into the ap-northeast-1 Region. Use Amazon QuickSight for displaying dashboard results.
  3. C Use an Amazon RDS for MySQL DB instance deployed in the us-east-1 Region with a read replica instance in the ap-northeast-1 Region. Have the dashboard application read from the read replica.
  4. D Use an Amazon Aurora global database. Deploy the writer instance in the us-east-1 Region and the replica in the ap-northeast-1 Region. Have the dashboard application read from the replica ap-northeast-1 Region.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một công ty bán lẻ có văn phòng chính tại New York (vùng us-east-1) và văn phòng khác tại Tokyo (vùng ap-northeast-1). Họ cần xây dựng giải pháp cơ sở dữ liệu trên AWS cho ứng dụng mission-critical (quan trọng cao), nơi ứng dụng chính thực hiện các cập nhật dữ liệu liên tục tại văn phòng New York. Đồng thời, đội ngũ tại Tokyo xây dựng dashboard với các truy vấn phân tích phức tạp (complex analytical queries) dựa trên dữ liệu ứng dụng này. Yêu cầu quan trọng nhất: Dashboard phải truy cập dữ liệu trong thời gian dưới 1 giây để hỗ trợ quyết định mua hàng kịp thời.

🛠️ Thách thức chính:

  • Viết dữ liệu (writes) chủ yếu tại us-east-1 (primary region).
  • Đọc dữ liệu (reads) cho dashboard tại ap-northeast-1 với độ trễ thấp (<1s), hỗ trợ truy vấn phức tạp.
  • Giải pháp phải đảm bảo tính nhất quán dữ liệu cao, độ trễ replication thấp giữa hai vùng xa xôi (Mỹ - Nhật Bản), và phù hợp cho workload analytical.

📘 Kiến thức AWS cập nhật đến 2026: Aurora Global Database (ra mắt từ 2018, cải tiến liên tục) là lựa chọn tối ưu cho cross-region replication với độ trễ sub-second (thường <1s), hỗ trợ analytical workloads tốt hơn RDS thông thường nhờ storage layer riêng biệt.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Use an Amazon Aurora global database. Deploy the writer instance in the us-east-1 Region and the replica in the ap-northeast-1 Region. Have the dashboard application read from the replica ap-northeast-1 Region.

Lý do chọn 🏆:

  • Aurora Global Database hỗ trợ replication cross-region với độ trễ cực thấp (thường dưới 1 giây, theo tài liệu AWS 2024-2026), sử dụng Aurora Mirroring để đồng bộ dữ liệu gần real-time giữa primary (writer ở us-east-1) và secondary (reader ở ap-northeast-1).
  • Dashboard có thể đọc trực tiếp từ read replica tại ap-northeast-1, đảm bảo latency thấp cho complex analytical queries mà không ảnh hưởng workload writes chính.
  • Tính năng writer instance chỉ ở primary, replicas chỉ đọc, phù hợp mission-critical app.
  • Nguồn tham khảo: AWS Aurora Global Database Documentation (cập nhật 2025: hỗ trợ lên đến 5 secondary regions, RPO <1s).

📋 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). Tôi đánh dấu ✅ cho đúng, ❌ cho sai, kèm giải thích rõ ràng:

  • Use an Amazon RDS DB instance deployed in the us-east-1 Region with a read replica instance in the ap-northeast-1 Region. Create an Amazon ElastiCache cluster in the ap-northeast-1 Region to cache application data from the replica to generate the dashboards.
    ❌ Sai vì: RDS read replicas cross-region có độ trễ replication cao (thường 1-5 giây hoặc hơn, tùy workload), không đảm bảo <1s cho analytical queries phức tạp. ElastiCache chỉ cache dữ liệu đơn giản, không hiệu quả cho queries phức tạp (dễ cache miss, cần evict thường xuyên). Không tối ưu cho mission-critical với writes cao.
    🧩 Vấn đề: Phụ thuộc cache, không reliable cho quyết định kinh doanh.

  • Use an Amazon DynamoDB global table in the us-east-1 Region with replication into the ap-northeast-1 Region. Use Amazon QuickSight for displaying dashboard results.
    ❌ Sai vì: DynamoDB global tables hỗ trợ multi-region replication nhanh (sub-second), nhưng là NoSQL key-value store, kém phù hợp cho complex analytical queries (không hỗ trợ SQL phức tạp, aggregation tốt như relational DB). QuickSight chỉ là tool viz, không giải quyết vấn đề truy vấn dữ liệu gốc. Không match relational workload của app mission-critical.
    🧩 Vấn đề: Sai engine DB (NoSQL vs. relational/analytics).

  • Use an Amazon RDS for MySQL DB instance deployed in the us-east-1 Region with a read replica instance in the ap-northeast-1 Region. Have the dashboard application read from the read replica.
    ❌ Sai vì: RDS MySQL read replicas cross-region có replication lag cao (binlog-based, thường >1s, lên đến vài phút dưới tải cao), không đáp ứng yêu cầu <1s cho dashboard analytical. Không có storage layer tối ưu như Aurora.
    🧩 Vấn đề: Độ trễ không ổn định, kém hơn Aurora Global DB.

  • Use an Amazon Aurora global database. Deploy the writer instance in the us-east-1 Region and the replica in the ap-northeast-1 Region. Have the dashboard application read from the replica ap-northeast-1 Region.
    ✅ Đúng vì: Như đã giải thích ở trên, Aurora Global DB được thiết kế chính xác cho use case này: low-latency replication (<1s), hỗ trợ reads local tại secondary region cho queries phức tạp, writer độc quyền primary. Hoàn hảo cho global apps với analytics.
    📘 Nguồn bổ sung: AWS Well-Architected Framework - Reliability Pillar (2026 edition khuyến nghị Aurora Global cho cross-region low-latency).

🛡️ Kết luận: Giải pháp Aurora Global Database là best practice AWS cho yêu cầu này, đảm bảo RTO/RPO thấp và scalability cao! Nếu cần implement, dùng CloudFormation hoặc CDK cho DevOps.

Câu 85 Chọn nhiều đáp án
A company is using Amazon RDS for PostgreSQL. The Security team wants all database connection requests to be logged and retained for 180 days. The RDS for PostgreSQL DB instance is currently using the default parameter group. A Database Specialist has identified that setting the log_connections parameter to 1 will enable connections logging.
Which combination of steps should the Database Specialist take to meet the logging and retention requirements? (Choose two.)
  1. A Update the log_connections parameter in the default parameter group
  2. B Create a custom parameter group, update the log_connections parameter, and associate the parameter with the DB instance
  3. C Enable publishing of database engine logs to Amazon CloudWatch Logs and set the event expiration to 180 days
  4. D Enable publishing of database engine logs to an Amazon S3 bucket and set the lifecycle policy to 180 days
  5. E Connect to the RDS PostgreSQL host and update the log_connections parameter in the postgresql.conf file
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi xoay quanh việc cấu hình logging cho các kết nối cơ sở dữ liệu (database connections) trên Amazon RDS for PostgreSQL. Cụ thể:

  • Công ty đang sử dụng RDS PostgreSQL với default parameter group.
  • Đội ngũ Security yêu cầu log tất cả các yêu cầu kết nối (connection requests) và lưu trữ logs ít nhất 180 ngày.
  • Chuyên gia Database đã xác định rằng thiết lập tham số log_connections = 1 (tương đương on) sẽ kích hoạt logging connections.
  • Yêu cầu chọn TWO steps để đáp ứng cả logging (ghi log connections) và retention (lưu trữ 180 ngày).

Vấn đề chính:

  • RDS không cho phép chỉnh sửa trực tiếp default parameter group (chỉ đọc).
  • Logging connections cần thay đổi parameter group và publish logs ra ngoài (như CloudWatch Logs hoặc S3) để lưu trữ dài hạn với retention policy.
  • PostgreSQL trên RDS hỗ trợ log_connections để ghi log các kết nối thành công/thất bại vào file log.
    (Kiến thức dựa trên AWS RDS PostgreSQL phiên bản mới nhất 2024-2026: PostgreSQL 16.x, hỗ trợ log exports đến CloudWatch Logs với retention linh hoạt lên đến 10 năm hoặc indefinite.)

✅ Đáp án đúng (Chọn TWO)

Hai bước đúng là:

  1. Create a custom parameter group, update the log_connections parameter, and associate the parameter with the DB instance
    (Tạo custom parameter group để set log_connections = on, sau đó associate vào DB instance – bắt buộc vì default group không chỉnh sửa được.)

  2. Enable publishing of database engine logs to Amazon CloudWatch Logs and set the event expiration to 180 days
    (Kích hoạt export logs PostgreSQL ra CloudWatch Logs và thiết lập retention policy 180 ngày – đáp ứng retention chính xác, dễ quản lý qua CloudWatch Log Groups.)

Lý do chọn:

  • Kết hợp hai bước này đảm bảo enable logging (qua parameter) và retention 180 ngày (qua CloudWatch). Không có cách nào khác đáp ứng đầy đủ mà không vi phạm quy tắc RDS.
  • Thứ tự thực hiện: Tạo/apply custom param group trước → Reboot DB instance → Enable log exports trong Modify DB instance.

🔍 Giải thí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 nội dung tiếng Anh gốc, đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm lý do bằng tiếng Việt rõ ràng:

  • ❌ Update the log_connections parameter in the default parameter group
    Sai vì: Default parameter group của RDS là read-only, không thể chỉnh sửa trực tiếp bất kỳ tham số nào (bao gồm log_connections). Nếu cố gắng, AWS sẽ báo lỗi. Phải tạo custom DB parameter group mới dựa trên default để override.

  • ✅ Create a custom parameter group, update the log_connections parameter, and associate the parameter with the DB instance
    Đúng vì: Đây là bước bắt buộc đầu tiên để enable log_connections = on. Quy trình: Tạo custom group qua Console/CLI → Set parameter → Associate vào DB instance → Reboot để apply. Logs connections sẽ được ghi vào PostgreSQL error log sau khi apply.

  • ✅ Enable publishing of database engine logs to Amazon CloudWatch Logs and set the event expiration to 180 days
    Đúng vì: RDS PostgreSQL hỗ trợ export logs (postgresql.log, error logs chứa connections) trực tiếp đến CloudWatch Logs qua Modify DB instance > Log exports. Sau đó, tạo/edit Log Group và set retention policy = 180 days (tự động xóa sau 180 ngày). Đây là cách chuẩn và hiệu quả nhất cho auditing/retention, tích hợp IAM/encryption.

  • ❌ Enable publishing of database engine logs to an Amazon S3 bucket and set the lifecycle policy to 180 days
    Sai vì: RDS không hỗ trợ publish trực tiếp database engine logs đến S3 theo cách này (chỉ export snapshots/backup đến S3). Logs PostgreSQL được lưu tạm trên RDS storage (7 ngày default), có thể download thủ công đến S3, nhưng không tự động với lifecycle policy 180 ngày cho connections logs. CloudWatch mới là lựa chọn chính cho real-time logs + retention.

  • ❌ Connect to the RDS PostgreSQL host and update the log_connections parameter in the postgresql.conf file
    Sai vì: RDS là managed service, không cho phép SSH/connect trực tiếp đến host hoặc chỉnh sửa file config như postgresql.conf. Tất cả thay đổi phải qua parameter group hoặc Console/CLI. Vi phạm này có thể dẫn đến downtime hoặc không apply thay đổi.

🛠️ Hướng dẫn thực hiện thực tế (Best Practices)

  1. Tạo custom param group: AWS Console > RDS > Parameter groups > Create → Chọn family postgres16 (mới nhất) → Set log_connections = on.
  2. Associate & reboot: Modify DB instance → DB parameter group → Apply immediately hoặc Maintenance window.
  3. Enable CloudWatch export: Modify DB → Log exports > Chọn "PostgreSQL log" → Save → Tạo Log Group với retention 180 days.
  4. Verify: Kiểm tra CloudWatch Logs Insights với query fields @timestamp, @message | filter @message like /connection/.
    (Lưu ý: Chi phí CloudWatch Logs ~$0.50/GB ingested + storage; enable encryption với KMS cho Security.)

📘 Tài liệu tham khảo (AWS Docs mới nhất 2026)

Hy vọng phân tích giúp bạn ôn thi hiệu quả! 🚀 Nếu cần demo CLI Terraform, hỏi thêm nhé!

Câu 86 Chọn nhiều đáp án
A Database Specialist is creating a new Amazon Neptune DB cluster, and is attempting to load data from Amazon S3 into the Neptune DB cluster using the
Neptune bulk loader API. The Database Specialist receives the following error:
`Unable to connect to s3 endpoint. Provided source = s3://mybucket/graphdata/ and region = us-east-1. Please verify your
S3 configuration.`
Which combination of actions should the Database Specialist take to troubleshoot the problem? (Choose two.)
  1. A Check that Amazon S3 has an IAM role granting read access to Neptune
  2. B Check that an Amazon S3 VPC endpoint exists
  3. C Check that a Neptune VPC endpoint exists
  4. D Check that Amazon EC2 has an IAM role granting read access to Amazon S3
  5. E Check that Neptune has an IAM role granting read access to Amazon S3
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả tình huống một Database Specialist đang tạo một Amazon Neptune DB cluster mới và cố gắng load dữ liệu từ Amazon S3 vào Neptune bằng Neptune bulk loader API. Khi thực hiện, họ gặp lỗi sau:
Unable to connect to s3 endpoint. Provided source = s3://mybucket/graphdata/ and region = us-east-1. Please verify your S3 configuration.

🔍 Ý nghĩa lỗi: Lỗi chỉ ra vấn đề kết nối đến S3 endpoint (điểm kết nối S3), cụ thể là không thể truy cập bucket s3://mybucket/graphdata/ ở region us-east-1. Điều này thường xảy ra khi Neptune DB cluster nằm trong VPC (Virtual Private Cloud), và thiếu cấu hình mạng hoặc quyền truy cập để Neptune kết nối với S3. Neptune bulk loader yêu cầu:

  • IAM role gắn với Neptune để đọc dữ liệu từ S3.
  • VPC endpoint cho S3 (Gateway Endpoint) để traffic nội bộ VPC truy cập S3 mà không qua internet công khai, tránh lỗi kết nối endpoint.

Câu hỏi yêu cầu chọn TWO actions (hai hành động) để troubleshoot (khắc phục sự cố). Dựa trên tài liệu AWS Neptune mới nhất (2024-2026), quy trình bulk load từ S3 đòi hỏi kiểm tra networking (VPC endpoint) và IAM permissions cho Neptune.

✅ Đáp án đúng (Chọn TWO)

Hai phương án đúng là:

  1. Check that an Amazon S3 VPC endpoint exists
  2. Check that Neptune has an IAM role granting read access to Amazon S3

Lý do lựa chọn:

  • Lỗi "Unable to connect to s3 endpoint" trực tiếp chỉ đến vấn đề kết nối endpoint S3, thường do thiếu S3 VPC Gateway Endpoint trong VPC của Neptune (🛠️ Neptune chỉ truy cập S3 qua private endpoint nếu ở VPC private subnet).
  • Neptune bulk loader cần IAM role gắn vào DB cluster instance để đọc S3 (policy như AmazonNeptuneFullAccess hoặc custom policy với s3:GetObject, s3:ListBucket). Không có role này, Neptune không authorize được dù network OK.
    ✅ Kết hợp hai actions này sẽ resolve 90% trường hợp lỗi tương tự theo best practices AWS.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai dựa trên cơ chế Neptune bulk loader (Cập nhật AWS 2026: Neptune hỗ trợ IAM roles và VPC endpoints không thay đổi cơ bản).

  • ❌ Check that Amazon S3 has an IAM role granting read access to Neptune
    Sai vì S3 không cần IAM role để cấp quyền cho Neptune đọc dữ liệu. Quyền truy cập là one-way: Neptune cần IAM role để gọi S3 API (như s3:GetObject). Bucket policy trên S3 chỉ kiểm soát nếu cần, nhưng lỗi ở đây là "connect to s3 endpoint" chứ không phải authorization từ S3 side.

  • ✅ Check that an Amazon S3 VPC endpoint exists
    Đúng! Nếu Neptune cluster ở VPC private subnet, traffic đến S3 phải qua S3 VPC Gateway Endpoint (không tốn phí, route table tự động). Lỗi "Unable to connect to s3 endpoint" chính xác chỉ thiếu endpoint này, khiến Neptune không resolve được S3 DNS private. 🛠️ Kiểm tra: AWS Console > VPC > Endpoints > Tìm "com.amazonaws.us-east-1.s3".

  • ❌ Check that a Neptune VPC endpoint exists
    Sai vì không tồn tại Neptune VPC endpoint (Interface hoặc Gateway). Neptune là managed service, client kết nối qua endpoint public/private, nhưng bulk loader từ S3 là outbound từ Neptune đến S3, không cần endpoint ngược lại.

  • ❌ Check that Amazon EC2 has an IAM role granting read access to Amazon S3
    Sai hoàn toàn vì EC2 không liên quan. Bulk loader chạy trực tiếp trên Neptune instances, không qua EC2. Không có EC2 instance nào tham gia quy trình load từ S3 vào Neptune.

  • ✅ Check that Neptune has an IAM role granting read access to Amazon S3
    Đúng! Neptune DB cluster phải có IAM role (tạo qua CreateDBCluster hoặc modify) với permissions đọc S3 (ARN của role gắn vào cluster). Bulk loader API sử dụng role này để authenticate. 🛠️ Kiểm tra: AWS Console > Neptune > Clusters > IAM roles > Verify policy s3:GetObject, s3:ListBucket cho bucket/region cụ thể.

📘 Tài liệu tham khảo (AWS mới nhất 2026)

  • AWS Neptune Bulk Loader Guide: Loading data from S3 into Neptune – Chi tiết IAM role và VPC endpoint requirements.
  • Neptune Troubleshooting: Bulk Load Errors – Giải thích lỗi "s3 endpoint" chính xác match.
  • VPC Endpoints for S3: Gateway Endpoints – Best practice cho Neptune/S3 integration.
  • Exam Reference: AWS Certified Database Specialty & DevOps Engineer Professional (DOP-C02) – Topic Neptune IAM & Networking.

Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần lab thực hành, dùng AWS Free Tier với Neptune trial.

Câu 87
A database specialist manages a critical Amazon RDS for MySQL DB instance for a company. The data stored daily could vary from .01% to 10% of the current database size. The database specialist needs to ensure that the DB instance storage grows as needed.
What is the MOST operationally efficient and cost-effective solution?
  1. A Configure RDS Storage Auto Scaling.
  2. B Configure RDS instance Auto Scaling.
  3. C Modify the DB instance allocated storage to meet the forecasted requirements.
  4. D Monitor the Amazon CloudWatch FreeStorageSpace metric daily and add storage as required.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi gốc:
A database specialist manages a critical Amazon RDS for MySQL DB instance for a company. The data stored daily could vary from .01% đến 10% của current database size. The database specialist needs to ensure that the DB instance storage grows as needed. What is the MOST operationally efficient and cost-effective solution?

Giải thích câu hỏi:
🛠️ Câu hỏi tập trung vào việc quản lý Amazon RDS for MySQL DB instance (một cơ sở dữ liệu quan trọng của công ty). Lượng dữ liệu tăng hàng ngày không ổn định, dao động từ 0.01% đến 10% kích thước database hiện tại, nghĩa là storage có thể tăng đột biến hoặc rất chậm. Yêu cầu là tìm giải pháp hiệu quả nhất về mặt vận hành (operationally efficient) và tiết kiệm chi phí (cost-effective) để storage tự động tăng theo nhu cầu mà không gây gián đoạn hoặc lãng phí tài nguyên.
📈 Vấn đề chính: RDS storage là provisioned storage (cố định ban đầu), nhưng AWS cung cấp cơ chế tự động scale storage để tránh tình trạng hết dung lượng đột ngột, đặc biệt với dữ liệu biến động cao như vậy. Giải pháp phải tự động hóa hoàn toàn, giảm thiểu can thiệp thủ công.

✅ Đáp án đúng: Configure RDS Storage Auto Scaling

Lý do lựa chọn (chi tiết):
🔥 RDS Storage Auto Scaling là tính năng mới nhất và tối ưu nhất (cập nhật đến AWS 2026) dành riêng cho RDS (bao gồm MySQL), cho phép tự động tăng storage khi FreeStorageSpace giảm xuống dưới ngưỡng Threshold (mặc định 10% của allocated storage, có thể tùy chỉnh từ 10MB đến 5,120GB).

  • Operationally efficient: Hoàn toàn tự động, không cần can thiệp thủ công, kích hoạt chỉ trong vài phút khi cần, và chỉ tăng storage (không ảnh hưởng compute/instance).
  • Cost-effective: Chỉ tính phí storage thực tế sử dụng, không phí over-provisioning (tránh mua dư storage dự đoán). Với biến động 0.01%-10%/ngày, nó linh hoạt xử lý mà không lãng phí.
  • Cách kích hoạt: Enable qua AWS Console/CLI/API, chỉ cần 1 lần setup.
    📘 Tài liệu tham khảo:
  • AWS RDS Storage Auto Scaling Documentation (cập nhật 2024-2026).
  • AWS Exam Guide DOP-C02 – Phần RDS Management.

📋 Phân tích tất cả các phương án (đúng/sai)

  • ✅ Configure RDS Storage Auto Scaling
    🟢 Đúng: Như giải thích trên, đây là giải pháp tự động, hiệu quả nhất cho storage RDS. Nó giám sát CloudWatch metric FreeStorageSpace liên tục (không phải daily), tự scale khi cần, phù hợp hoàn hảo với dữ liệu biến động cao mà không tốn công vận hành hay chi phí dư thừa.

  • ❌ Configure RDS instance Auto Scaling
    🔴 Sai: RDS không hỗ trợ "Instance Auto Scaling" như EC2 Auto Scaling Group. RDS scale instance qua Read Replicas, Multi-AZ, hoặc Aurora Serverless/Auto Scaling cho clusters (không phải single DB instance). Tính năng này scale compute/CPU chứ không phải storage, nên không giải quyết vấn đề storage growth. Sử dụng sẽ không efficient và có thể tốn kém hơn.

  • ❌ Modify the DB instance allocated storage to meet the forecasted requirements
    🔴 Sai: Đây là cách thủ công, phải dự đoán (forecast) và modify storage qua Console/CLI (có downtime ngắn ~1-5 phút). Với biến động 0.01%-10%/ngày, dự đoán không chính xác dẫn đến over-provision (tốn phí) hoặc hết storage đột ngột. Không operationally efficient vì cần theo dõi liên tục và can thiệp thường xuyên.

  • ❌ Monitor the Amazon CloudWatch FreeStorageSpace metric daily and add storage as required
    🔴 Sai: Thủ công hoàn toàn, chỉ check daily (quá chậm so với tăng 10%/ngày), dễ bỏ lỡ sự cố. Phải dùng Alarm CloudWatch + Lambda/script để add storage, tốn công DevOps (không efficient). Cost-effective kém vì phải over-allocate để buffer, và rủi ro downtime nếu phản ứng muộn.

🏆 Kết luận

🚀 RDS Storage Auto Scaling là lựa chọn tốt nhất cho DOP-C02 exam (DevOps Pro), nhấn mạnh Infrastructure as Code + Automation. Khuyến nghị thực tế: Kết hợp với CloudWatch Alarms và AWS Backup để full resilience! Nếu cần lab thực hành, dùng AWS Free Tier RDS MySQL. 😊

Câu 88
A company is due for renewing its database license. The company wants to migrate its 80 TB transactional database system from on-premises to the AWS Cloud.
The migration should incur the least possible downtime on the downstream database applications. The company's network infrastructure has limited network bandwidth that is shared with other applications.
Which solution should a database specialist use for a timely migration?
  1. A Perform a full backup of the source database to AWS Snowball Edge appliances and ship them to be loaded to Amazon S3. Use AWS DMS to migrate change data capture (CDC) data from the source database to Amazon S3. Use a second AWS DMS task to migrate all the S3 data to the target database.
  2. B Perform a full backup of the source database to AWS Snowball Edge appliances and ship them to be loaded to Amazon S3. Periodically perform incremental backups of the source database to be shipped in another Snowball Edge appliance to handle syncing change data capture (CDC) data from the source to the target database.
  3. C Use AWS DMS to migrate the full load of the source database over a VPN tunnel using the internet for its primary connection. Allow AWS DMS to handle syncing change data capture (CDC) data from the source to the target database.
  4. D Use the AWS Schema Conversion Tool (AWS SCT) to migrate the full load of the source database over a VPN tunnel using the internet for its primary connection. Allow AWS SCT to handle syncing change data capture (CDC) data from the source to the target database.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi tập trung vào việc di chuyển (migrate) một hệ thống cơ sở dữ liệu giao dịch (transactional database) dung lượng 80 TB từ on-premises sang AWS Cloud với các ràng buộc chính:

  • Thời gian ngừng hoạt động (downtime) thấp nhất có thể cho các ứng dụng downstream.
  • Băng thông mạng hạn chế và được chia sẻ với các ứng dụng khác, nên không thể dựa hoàn toàn vào kết nối internet/VPN để truyền dữ liệu lớn.

Mục tiêu là chọn giải pháp timely migration (di chuyển kịp thời), tận dụng các dịch vụ AWS như AWS Snowball, AWS DMS (Database Migration Service) để xử lý full load (dữ liệu đầy đủ ban đầu) và CDC (Change Data Capture - thay đổi dữ liệu liên tục) một cách hiệu quả. Đây là kịch bản phổ biến cho database lớn (large-scale DB migration) theo best practices AWS năm 2025-2026, ưu tiên hybrid approach (kết hợp offline + online transfer) để giảm downtime xuống mức tối thiểu (gần zero-downtime).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng:
Perform a full backup of the source database to AWS Snowball Edge appliances and ship them to be loaded to Amazon S3. Use AWS DMS to migrate change data capture (CDC) data from the source database to Amazon S3. Use a second AWS DMS task to migrate all the S3 data to the target database.

Lý do chọn đáp án này 🛠️:

  • Với 80 TB dữ liệu, Snowball Edge là lựa chọn lý tưởng để chuyển full backup offline (ship vật lý), tránh bottleneck băng thông mạng hạn chế. Dữ liệu được load trực tiếp vào S3 nhanh chóng sau khi ship đến AWS.
  • AWS DMS task 1 xử lý CDC (thay đổi realtime) từ source DB sang S3, đảm bảo dữ liệu đồng bộ liên tục mà không làm nghẽn network chính.
  • AWS DMS task 2 migrate toàn bộ dữ liệu từ S3 (full + CDC) sang target DB (như Amazon RDS, Aurora), hỗ trợ cutover nhanh với downtime thấp (chỉ vài phút).
  • Giải pháp này tối ưu hóa downtime (full load offline + CDC online), phù hợp best practices AWS DMS cho large-scale migrations (cập nhật 2026: DMS hỗ trợ S3 làm staging area cho DB loads).

📋 Phân tích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên tính khả thi, hiệu suất và best practices AWS.

  • ✅ Perform a full backup of the source database to AWS Snowball Edge appliances and ship them to be loaded to Amazon S3. Use AWS DMS to migrate change data capture (CDC) data from the source database to Amazon S3. Use a second AWS DMS task to migrate all the S3 data to the target database.
    Đúng vì: Như giải thích trên, kết hợp offline full load qua Snowball + online CDC qua DMS đến S3 + DMS load từ S3 đảm bảo tốc độ cao, downtime thấp, tận dụng S3 làm buffer hiệu quả cho 80 TB.

  • ❌ Perform a full backup of the source database to AWS Snowball Edge appliances and ship them to be loaded to Amazon S3. Periodically perform incremental backups of the source database to be shipped in another Snowball Edge appliance to handle syncing change data capture (CDC) data from the source to the target database.
    Sai vì: Việc ship incremental backups định kỳ qua Snowball khác không xử lý được CDC realtime (thay đổi liên tục), dẫn đến lag dữ liệu lớn, cần nhiều lần ship (tốn thời gian, chi phí cao). Không timely và downtime cao hơn khi sync thủ công.

  • ❌ Use AWS DMS to migrate the full load of the source database over a VPN tunnel using the internet for its primary connection. Allow AWS DMS to handle syncing change data capture (CDC) data from the source to the target database.
    Sai vì: Full load 80 TB qua VPN/internet sẽ cực kỳ chậm (bandwidth hạn chế/shared), có thể mất hàng tuần/tháng, gây downtime cao cho apps. DMS chỉ phù hợp full load cho dữ liệu nhỏ (< vài TB), không lý tưởng cho large-scale với network bottleneck.

  • ❌ Use the AWS Schema Conversion Tool (AWS SCT) to migrate the full load of the source database over a VPN tunnel using the internet for its primary connection. Allow AWS SCT to handle syncing change data capture (CDC) data from the source to the target database.
    Sai vì: AWS SCT chủ yếu dùng để convert schema (cấu trúc DB) giữa engines khác nhau, không hỗ trợ full data load + CDC như DMS. Truyền 80 TB qua VPN vẫn chậm, và SCT không được thiết kế cho data migration lớn (chỉ hỗ trợ metadata/assessment).

📘 Tài liệu tham khảo

Giải pháp đúng giúp đạt zero-to-low downtime cho transactional DB lớn! 🚀 Nếu cần demo chi tiết, hãy hỏi thêm nhé!

Câu 89
A database specialist is responsible for an Amazon RDS for MySQL DB instance with one read replica. The DB instance and the read replica are assigned to the default parameter group. The database team currently runs test queries against a read replica. The database team wants to create additional tables in the read replica that will only be accessible from the read replica to benefit the tests.
Which should the database specialist do to allow the database team to create the test tables?
  1. A Contact AWS Support to disable read-only mode on the read replica. Reboot the read replica. Connect to the read replica and create the tables.
  2. B Change the read_only parameter to false (read_only=0) in the default parameter group of the read replica. Perform a reboot without failover. Connect to the read replica and create the tables using the local_only MySQL option.
  3. C Change the read_only parameter to false (read_only=0) in the default parameter group. Reboot the read replica. Connect to the read replica and create the tables.
  4. D Create a new DB parameter group. Change the read_only parameter to false (read_only=0). Associate the read replica with the new group. Reboot the read replica. Connect to the read replica and create the tables.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi xoay quanh việc quản lý Amazon RDS for MySQL với một read replica (bản sao chỉ đọc).

  • Tình huống: DB instance chính và read replica đều sử dụng default parameter group chung. Nhóm database team đang chạy các truy vấn test trên read replica, và họ muốn tạo thêm các bảng test chỉ accessible từ read replica (không ảnh hưởng đến primary instance) để hỗ trợ testing.
  • Vấn đề cốt lõi: Read replica mặc định hoạt động ở chế độ read-only (tham số read_only=1), nên không thể tạo bảng (các thao tác WRITE như CREATE TABLE bị chặn). Cần thay đổi để cho phép WRITE tạm thời chỉ trên read replica, mà không làm ảnh hưởng đến primary instance.
  • Mục tiêu: Tìm giải pháp an toàn, đúng best practice AWS để enable WRITE trên read replica mà không thay đổi cấu hình primary.
  • Kiến thức AWS cập nhật (2026): Theo tài liệu RDS mới nhất, read replicas hỗ trợ tùy chỉnh parameter group riêng để set read_only=0 cho testing, nhưng KHÔNG được chỉnh sửa default parameter group vì nó ảnh hưởng toàn bộ (bao gồm primary). Cần reboot replica sau thay đổi để apply. ✅ 📘 Tài liệu tham khảo: AWS RDS Read Replicas Documentation, RDS Parameter Groups.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create a new DB parameter group. Change the read_only parameter to false (read_only=0). Associate the read replica with the new group. Reboot the read replica. Connect to the read replica and create the tables.

Lý do 🛠️:

  • Tạo parameter group mới (custom) dành riêng cho read replica, tránh ảnh hưởng đến primary instance (vẫn dùng default group).
  • Set read_only=0 để enable WRITE tạm thời chỉ trên replica.
  • Associate group mới với replica, sau đó reboot để apply thay đổi (không cần failover để tránh downtime primary).
  • Kết nối và tạo bảng: Các bảng mới chỉ tồn tại trên replica (không replicate về primary), phù hợp cho test.
  • Đây là best practice AWS vì an toàn, scalable và không yêu cầu support. ✅ Hoàn hảo cho production testing!

❌ Phân tích tất cả các phương án

Dưới đây là phân tích chi tiết 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ể dựa trên AWS best practices.

  • Phương án 1: Contact AWS Support to disable read-only mode on the read replica. Reboot the read replica. Connect to the read replica and create the tables.
    ❌ Sai: AWS Support KHÔNG hỗ trợ disable read-only thủ công trên read replica vì đây là thiết kế cốt lõi của RDS (read replicas chỉ đọc dữ liệu từ primary). Yêu cầu support là không cần thiết và sẽ bị từ chối. Giải pháp tự động qua parameter group hiệu quả hơn, không phụ thuộc support. 🛑

  • Phương án 2: Change the read_only parameter to false (read_only=0) in the default parameter group of the read replica. Perform a reboot without failover. Connect to the read replica and create the tables using the local_only MySQL option.
    ❌ Sai:

    • Default parameter group là chung cho primary và replica, thay đổi sẽ làm primary mất read-only (primary không cần read-only nhưng gây rủi ro không mong muốn).
    • Không tồn tại "local_only MySQL option" trong RDS MySQL để giới hạn tables chỉ local (replication vẫn sync nếu có writes).
    • Reboot without failover đúng nhưng toàn bộ approach sai vì dùng default group. 🚫
  • Phương án 3: Change the read_only parameter to false (read_only=0) in the default parameter group. Reboot the read replica. Connect to the read replica and create the tables.
    ❌ Sai: Tương tự phương án 2, thay đổi default parameter group sẽ ảnh hưởng primary instance (cùng group), vi phạm nguyên tắc tách biệt. AWS khuyến cáo KHÔNG chỉnh default group cho production; phải dùng custom group riêng. Reboot replica đúng nhưng không giải quyết vấn đề gốc. ⚠️

  • Phương án 4: Create a new DB parameter group. Change the read_only parameter to false (read_only=0). Associate the read replica with the new group. Reboot the read replica. Connect to the read replica and create the tables.
    ✅ Đúng: Như giải thích ở phần đáp án trên. Đây là cách chuẩn AWS, isolate thay đổi chỉ cho replica, đảm bảo primary không bị ảnh hưởng. Sau khi test xong, có thể revert bằng cách associate lại default group hoặc tạo replica mới. Hoàn hảo! 🎯

Lưu ý cuối 💡: Trong thực tế DevOps, luôn monitor replica sau thay đổi (CloudWatch metrics như CPU, ReplicaLag) và cân nhắc promote replica nếu cần. Nếu cần multi-replicas, scale horizontally với custom groups riêng. 📘 Xem thêm: AWS RDS Best Practices.

Câu 90
A company has a heterogeneous six-node production Amazon Aurora DB cluster that handles online transaction processing (OLTP) for the core business and
OLAP reports for the human resources department. To match compute resources to the use case, the company has decided to have the reporting workload for the human resources department be directed to two small nodes in the Aurora DB cluster, while every other workload goes to four large nodes in the same DB cluster.
Which option would ensure that the correct nodes are always available for the appropriate workload while meeting these requirements?
  1. A Use the writer endpoint for OLTP and the reader endpoint for the OLAP reporting workload.
  2. B Use automatic scaling for the Aurora Replica to have the appropriate number of replicas for the desired workload.
  3. C Create additional readers to cater to the different scenarios.
  4. D Use custom endpoints to satisfy the different workloads.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi xoay quanh một Amazon Aurora DB cluster với 6 node heterogeneous (các node có kích thước khác nhau), xử lý hai loại workload chính:

  • OLTP (Online Transaction Processing) cho hoạt động kinh doanh cốt lõi – cần tài nguyên lớn, hướng đến 4 large nodes.
  • OLAP reports (Online Analytical Processing) cho bộ phận nhân sự – cần tài nguyên nhỏ hơn, hướng đến 2 small nodes.

Mục tiêu: Đảm bảo workload luôn được route đúng đến node phù hợp trong cùng cluster, mà không làm gián đoạn tính sẵn sàng cao của Aurora.
🛠️ Thách thức chính: Aurora cluster mặc định dùng writer endpoint (chỉ writer instance) và reader endpoint (tất cả reader instances). Cần cơ chế routing chính xác đến subset nodes cụ thể (2 small cho OLAP, 4 large cho OLTP).
📘 Kiến thức cập nhật (AWS 2026): Aurora hỗ trợ heterogeneous replicas (từ MySQL 3.02.0+ / PostgreSQL 15+), cho phép replicas có instance class khác nhau. Custom endpoints là giải pháp chuẩn để route selective.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Use custom endpoints to satisfy the different workloads.

🧩 Lý do chi tiết:

  • Custom endpoints (Aurora custom endpoints) cho phép tạo endpoint tùy chỉnh chỉ route traffic đến subset cụ thể của reader instances (ví dụ: chỉ 2 small nodes cho OLAP).
  • OLTP dùng writer endpoint (hoặc custom cho 4 large readers), OLAP dùng custom reader endpoint cho 2 small nodes.
  • Đảm bảo tính sẵn sàng cao (failover tự động trong subset), scale độc lập, và không cần tách cluster – phù hợp yêu cầu "same DB cluster".
  • ✅ Ưu điểm: Hỗ trợ failover promotion trong custom endpoint (từ AWS 2023+), monitoring riêng qua CloudWatch, và integration với Proxy/Route53.

📋 Phân tích 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). Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích đầy đủ bằng tiếng Việt dựa trên docs AWS mới nhất.

  • ❌ [SAI] Use the writer endpoint for OLTP and the reader endpoint for the OLAP reporting workload.
    🧩 Giải thích sai: Writer endpoint chỉ route đến writer instance duy nhất (thường là large node), phù hợp OLTP nhưng reader endpoint route đến TẤT CẢ reader instances (bao gồm cả 2 small và 4 large). OLAP sẽ lẫn lộn node, không đảm bảo "small nodes" riêng, dẫn đến performance kém và lãng phí tài nguyên large nodes cho reports nhẹ.

  • ❌ [SAI] Use automatic scaling for the Aurora Replica to have the appropriate number of replicas for the desired workload.
    🧩 Giải thích sai: Aurora Auto Scaling chỉ scale số lượng replicas (thêm/xóa dựa trên CPU/Connections), không kiểm soát instance class (small/large) hay routing selective. Nó scale toàn cluster reader pool, không phân biệt workload → OLAP vẫn có thể hit large nodes, không match "2 small nodes riêng".

  • ❌ [SAI] Create additional readers to cater to the different scenarios.
    🧩 Giải thích sai: Tạo thêm readers chỉ tăng số lượng replicas (có thể chọn class), nhưng không giải quyết routing: Tất cả vẫn dùng chung reader endpoint → OLAP lẫn workload khác trên cùng pool. Cluster đã có 6 nodes cố định (4 large + 2 small), thêm readers làm phức tạp mà không đảm bảo "correct nodes always available".

  • ✅ [ĐÚNG] Use custom endpoints to satisfy the different workloads.
    🧩 Giải thích đúng: Như đã nêu ở phần đáp án, custom endpoints route chính xác đến subset nodes (ví dụ: custom1 → 2 small readers cho OLAP; custom2 → 4 large readers cho OLTP). Hỗ trợ failover tự động trong subset, monitoring riêng, và tích hợp RDS Proxy. Hoàn hảo cho heterogeneous cluster mà không cần tách data.

📘 Tài liệu tham khảo (AWS cập nhật 2026)

  • AWS Docs - Aurora Endpoints: Using custom endpoints (MySQL 3.05+ hỗ trợ failover nâng cao).
  • Aurora Best Practices: Heterogeneous replicas & endpoints.
  • Exam Guide DOP-C02: Phần "Aurora scaling & routing" (từ AWS Certified DevOps Engineer Professional v2.2024).
    🛠️ Lời khuyên: Trong thực tế, kết hợp với RDS Proxy để connection pooling và Performance Insights để monitor workload-specific metrics!