Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
What should the database specialist do to enable encryption at rest for the Amazon DocumentDB cluster?
- A Take a snapshot of the Amazon DocumentDB cluster. Restore the unencrypted snapshot as a new cluster while specifying the encryption option, and provide an AWS Key Management Service (AWS KMS) key.
- B Enable encryption for the Amazon DocumentDB cluster on the AWS Management Console. Reboot the cluster.
- C Modify the Amazon DocumentDB cluster by using the modify-db-cluster command with the --storage-encrypted parameter set to true.
- D Add a new encrypted instance to the Amazon DocumentDB cluster, and then delete an unencrypted instance from the cluster. Repeat until all instances are encrypted.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh tình huống một công ty thương mại điện tử (ecommerce) đã di chuyển cơ sở dữ liệu MongoDB từ on-premises sang Amazon DocumentDB (with MongoDB compatibility). Sau khi migration hoàn tất, chuyên gia cơ sở dữ liệu (database specialist) phát hiện rằng encryption at rest (mã hóa dữ liệu khi lưu trữ) chưa được kích hoạt cho Amazon DocumentDB cluster.
📌 Yêu cầu chính: Chuyên gia cần thực hiện bước nào để bật encryption at rest cho cluster này một cách an toàn và hiệu quả?
Lưu ý quan trọng từ kiến thức AWS mới nhất (cập nhật đến 2026): Amazon DocumentDB không hỗ trợ thay đổi trạng thái mã hóa (encryption status) trực tiếp trên cluster đang tồn tại. Đây là thiết kế bảo mật của AWS để tránh rủi ro dữ liệu nhạy cảm. Thay vào đó, phải sử dụng cơ chế snapshot để tạo cluster mới với mã hóa được bật từ đầu, sử dụng AWS KMS key để quản lý khóa mã hóa.
✅ Đáp án đúng
Take a snapshot of the Amazon DocumentDB cluster. Restore the unencrypted snapshot as a new cluster while specifying the encryption option, and provide an AWS Key Management Service (AWS KMS) key.
Lý do chọn đáp án này:
🛠️ Đây là phương pháp chuẩn và duy nhất được AWS khuyến nghị cho Amazon DocumentDB (xác nhận trong tài liệu chính thức AWS năm 2024-2026).
- Bước 1: Tạo snapshot từ cluster chưa mã hóa (unencrypted cluster).
- Bước 2: Restore snapshot đó thành cluster mới, đồng thời chỉ định tùy chọn encryption và liên kết với AWS KMS key (có thể dùng default AWS-managed key hoặc customer-managed key).
- Sau đó, cập nhật ứng dụng để chuyển hướng traffic sang cluster mới, rồi xóa cluster cũ.
✅ Phương pháp này không làm gián đoạn dữ liệu, đảm bảo tính toàn vẹn, và tuân thủ best practices bảo mật AWS (zero-downtime migration nếu dùng blue-green deployment).
❌ 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 văn bản gốc bằng tiếng Anh, kèm giải thích lý do đúng/sai bằng tiếng Việt:
-
✅ Take a snapshot of the Amazon DocumentDB cluster. Restore the unencrypted snapshot as a new cluster while specifying the encryption option, and provide an AWS Key Management Service (AWS KMS) key.
🛠️ Đúng như đã giải thích ở trên. Đây là quy trình tiêu chuẩn, hỗ trợ bởi AWS CLI/API/Console, và áp dụng cho tất cả phiên bản DocumentDB từ 4.0 đến 5.x (2026). -
❌ Enable encryption for the Amazon DocumentDB cluster on the AWS Management Console. Reboot the cluster.
🚫 Sai hoàn toàn. AWS Management Console không cho phép bật encryption at rest trực tiếp trên cluster đang chạy. Tùy chọn này chỉ khả dụng khi tạo cluster mới. Việc reboot cluster cũng không ảnh hưởng đến encryption status, chỉ dùng để áp dụng maintenance hoặc parameter changes. -
❌ Modify the Amazon DocumentDB cluster by using the modify-db-cluster command with the --storage-encrypted parameter set to true.
🚫 Sai. Lệnh AWS CLImodify-db-clustervới--storage-encrypted truebị từ chối nếu cluster đã tồn tại và chưa mã hóa. AWS thiết kế DocumentDB để không thể modify encryption status sau khi tạo, tránh rủi ro bảo mật (error: "StorageEncrypted can only be set at cluster creation time"). -
❌ Add a new encrypted instance to the Amazon DocumentDB cluster, and then delete an unencrypted instance from the cluster. Repeat until all instances are encrypted.
🚫 Sai và không khả thi. Trong DocumentDB, encryption at rest là thuộc tính của toàn cluster, không phải per-instance. Không thể mix encrypted/unencrypted instances trong cùng cluster – AWS sẽ báo lỗi khi add instance với encryption khác. Replica instances chỉ scale compute/storage, không thay đổi encryption.
📘 Tài liệu tham khảo (AWS Official Docs - Cập nhật 2026)
- Amazon DocumentDB User Guide: Encryption at Rest – Xác nhận "You can't enable encryption for an existing Amazon DocumentDB cluster".
- AWS DocumentDB FAQs: Encrypting Existing Clusters – Hướng dẫn snapshot & restore.
- AWS CLI Reference: restore-db-cluster-from-snapshot – Chi tiết lệnh với
--storage-encryptedvà--kms-key-id. - Best Practices: AWS Well-Architected Framework – Security Pillar (2025 edition).
🛡️ Lời khuyên DevOps: Luôn bật encryption at rest từ lúc tạo cluster trong CI/CD pipeline (CloudFormation/Terraform) để tránh tình huống này. Sử dụng AWS Config để audit encryption compliance!
The office in eu-west-2 has dashboards with complex analytical queries to display the data. The company will use these dashboards to make buying decisions, so the dashboards must have access to the application data in less than 1 second.
Which solution meets these requirements and provides the MOST up-to-date dashboard?
- A Deploy an Amazon RDS DB instance in us-east-1 with a read replica instance in eu-west-2. Create an Amazon ElastiCache cluster in eu-west-2 to cache data from the read replica to generate the dashboards.
- B Use an Amazon DynamoDB global table in us-east-1 with replication into eu-west-2. Use multi-active replication to ensure that updates are quickly propagated to eu-west-2.
- C Use an Amazon Aurora global database. Deploy the primary DB cluster in us-east-1. Deploy the secondary DB cluster in eu-west-2. Configure the dashboard application to read from the secondary cluster.
- D Deploy an Amazon RDS for MySQL DB instance in us-east-1 with a read replica instance in eu-west-2. Configure the dashboard application to read from the read replica.
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 phân tích thị trường chứng khoán có hai văn phòng: một ở us-east-1 (Mỹ Đông) và một ở eu-west-2 (Châu Âu Tây). Họ cần triển khai giải pháp cơ sở dữ liệu AWS để đảm bảo cập nhật nhanh chóng và chính xác (fast and accurate updates).
- Văn phòng eu-west-2 sử dụng dashboard với các truy vấn phân tích phức tạp để hiển thị dữ liệu, hỗ trợ quyết định mua bán.
- Yêu cầu quan trọng: Dashboard phải truy cập dữ liệu ứng dụng trong vòng dưới 1 giây (<1 second).
- Mục tiêu: Giải pháp phải đáp ứng yêu cầu và cung cấp dashboard cập nhật nhất (MOST up-to-date).
Vấn đề cốt lõi 📈: Cần cơ sở dữ liệu cross-region với độ trễ replication thấp (low replication lag), hỗ trợ đọc dữ liệu gần real-time từ vùng eu-west-2, phù hợp cho analytical queries phức tạp. Giải pháp phải ưu tiên tính freshness của dữ liệu cao nhất.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use an Amazon Aurora global database. Deploy the primary DB cluster in us-east-1. Deploy the secondary DB cluster in eu-west-2. Configure the dashboard application to read from the secondary cluster.
Lý do chi tiết 🛠️:
- Amazon Aurora Global Database (cập nhật đến 2026) là giải pháp tối ưu cho cross-region replication với độ trễ replication thấp nhất (thường <1 giây, trung bình 0.2-1 giây theo AWS benchmarks mới nhất).
- Primary cluster ở us-east-1 xử lý writes/updates chính, secondary ở eu-west-2 cho phép read từ secondary với dữ liệu gần real-time nhờ storage-based replication (không qua binlog như RDS thông thường).
- Dashboard ở eu-west-2 đọc trực tiếp từ secondary cluster → <1s latency, MOST up-to-date vì replication lag thấp hơn các giải pháp khác (không cache, không multi-active delay).
- Hỗ trợ analytical queries phức tạp nhờ engine Aurora MySQL/PostgreSQL mạnh mẽ, scalable.
- Không có downtime, failover tự động nếu cần.
📋 Giải thích tất cả các phương án
Dưới đây là phân tích từng phương án một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai dựa trên yêu cầu "MOST up-to-date dashboard <1s" và kiến thức AWS mới nhất (Aurora Global dẫn đầu về low-latency cross-region reads).
-
❌ Phương án SAI: Deploy an Amazon RDS DB instance in us-east-1 with a read replica instance in eu-west-2. Create an Amazon ElastiCache cluster in eu-west-2 to cache data from the read replica to generate the dashboards.
Giải thích: RDS read replica cross-region có replication lag cao (thường 1-10 giây hoặc hơn, phụ thuộc workload), cộng thêm ElastiCache chỉ cache dữ liệu cũ → không đảm bảo MOST up-to-date (có thể stale data vài phút). Phù hợp cho read-heavy nhưng không đạt <1s fresh data cho analytical decisions. ElastiCache thêm complexity và không giải quyết lag gốc. -
❌ Phương án SAI: Use an Amazon DynamoDB global table in us-east-1 with replication into eu-west-2. Use multi-active replication to ensure that updates are quickly propagated to eu-west-2.
Giải thích: DynamoDB Global Tables hỗ trợ multi-active replication nhanh (sub-second eventual consistency), nhưng không phù hợp analytical queries phức tạp (NoSQL key-value, kém với joins/aggregations nặng như dashboard stock analysis). Dữ liệu cuối cùng nhất quán nhưng không phải relational DB chuẩn cho "application data" phức tạp. Lag có thể >1s dưới tải cao, không phải MOST up-to-date cho reads cross-region so với Aurora. -
✅ Phương án ĐÚNG: Use an Amazon Aurora global database. Deploy the primary DB cluster in us-east-1. Deploy the secondary DB cluster in eu-west-2. Configure the dashboard application to read from the secondary cluster.
Giải thích: Như đã nêu ở phần đáp án đúng. Low-latency replication (storage-level, <1s), đọc trực tiếp secondary → dashboard up-to-date nhất, hỗ trợ complex queries. AWS khuyến nghị cho global apps cần fresh reads (cập nhật 2025-2026: hỗ trợ up to 5 secondary regions). -
❌ Phương án SAI: Deploy an Amazon RDS for MySQL DB instance in us-east-1 with a read replica instance in eu-west-2. Configure the dashboard application to read from the read replica.
Giải thích: RDS MySQL read replica cross-region dùng asynchronous binlog replication → lag cao (thường vài giây đến phút, đặc biệt analytical workload). Không đạt <1s hoặc MOST up-to-date (có RPO/RTO kém). Aurora Global vượt trội hơn RDS thông thường về performance (theo AWS Well-Architected).
📘 Tài liệu tham khảo
- AWS Documentation - Aurora Global Database (2026): https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html (Chi tiết replication lag <1s).
- AWS re:Post & Benchmarks: https://aws.amazon.com/rds/aurora/global-database/ (So sánh lag với RDS/DynamoDB).
- DevOps Pro Exam Guide (DOP-C02, 2025): Nhấn mạnh Aurora Global cho low-latency cross-region analytics.
- AWS Well-Architected Framework - Reliability Pillar: Khuyến nghị Aurora cho global consistency.
Giải pháp này đảm bảo high availability, low latency cho business-critical dashboards! 🚀
Which solution meets this requirement with the LEAST amount of effort?
- A Export the Aurora MySQL database to Amazon S3 by using AWS Database Migration Service (AWS DMS). Use Amazon Comprehend to run sentiment analysis on the exported files.
- B Export the Aurora MySQL database to Amazon S3 by using AWS Database Migration Service (AWS DMS). Use Amazon SageMaker to run sentiment analysis on the exported files.
- C Set up Aurora native integration with Amazon Comprehend. Use SQL functions to extract sentiment analysis.
- D Set up Aurora native integration with Amazon SageMaker. Use SQL functions to extract sentiment analysis.
Xem giải thích
🧩 Giải thích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh một công ty đang chạy ứng dụng thu thập phản hồi khách hàng (customer feedback) trên Amazon Aurora MySQL. Họ chạy báo cáo hàng ngày để trích xuất dữ liệu phản hồi, sau đó đội ngũ đọc thủ công để phân loại tích cực (positive) hay tiêu cực (negative), dẫn đến mất thời gian (có thể vài ngày) mới liên hệ khách hàng bất mãn và khắc phục. Yêu cầu chính: Sử dụng machine learning (ML) để tự động hóa quy trình này với ít nỗ lực nhất (LEAST amount of effort).
📌 Mục tiêu cốt lõi: Tích hợp ML trực tiếp vào workflow hiện tại trên Aurora MySQL, tránh các bước phức tạp như export dữ liệu, xử lý batch, hoặc xây dựng model custom, nhằm phân tích sentiment (cảm xúc) nhanh chóng và liền mạch.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Set up Aurora native integration with Amazon Comprehend. Use SQL functions to extract sentiment analysis.
Lý do chi tiết:
- Aurora MySQL hỗ trợ Aurora ML (tính năng native từ năm 2021 và cập nhật liên tục đến 2026), cho phép gọi trực tiếp Amazon Comprehend (dịch vụ managed NLP chuyên phân tích sentiment) qua các hàm SQL (như
aws_comprehend_detect_sentiment). - Least effort: Không cần export dữ liệu, không build pipeline ETL, chỉ cần enable integration và query SQL ngay trong database. Kết quả trả về real-time hoặc near-real-time, tự động hóa hoàn toàn workflow báo cáo hàng ngày.
- Phù hợp nhất vì Comprehend là fully-managed, không yêu cầu training model, xử lý text tiếng Anh/Việt/... với độ chính xác cao. 🛠️ Lợi ích: Giảm latency từ ngày xuống giây/phút, tích hợp seamless vào app hiện tại.
📋 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 một cách chi tiết. Tôi giữ nguyên văn bản gốc tiếng Anh của phương án, chỉ giải thích bằng tiếng Việt với lý do đúng/sai dựa trên kiến thức AWS mới nhất (Aurora ML version 3.x MySQL 8.0+ đến 2026).
-
❌ Phương án SAI: Export the Aurora MySQL database to Amazon S3 by using AWS Database Migration Service (AWS DMS). Use Amazon Comprehend to run sentiment analysis on the exported files.
Giải thích: Phương án này yêu cầu thiết lập DMS để export dữ liệu định kỳ từ Aurora sang S3 (full/CDC), sau đó invoke Comprehend trên file CSV/Parquet – effort cao: Cần config DMS task, IAM roles, Lambda/S3 trigger, xử lý schema/format text, và schedule hàng ngày. Không real-time, dễ lỗi sync dữ liệu, tăng chi phí storage/transfer. Không phải "least effort" so với native SQL. -
❌ Phương án SAI: Export the Aurora MySQL database to Amazon S3 by using AWS Database Migration Service (AWS DMS). Use Amazon SageMaker to run sentiment analysis on the exported files.
Giải thích: Tương tự trên, nhưng dùng SageMaker thay Comprehend – effort còn cao hơn: DMS export + build/deploy SageMaker endpoint (notebook, training job với model NLP như HuggingFace), inference script, autoscaling. SageMaker linh hoạt nhưng không managed như Comprehend cho sentiment, đòi hỏi DevOps setup phức tạp (container, endpoints), không phù hợp "least effort". -
✅ Phương án ĐÚNG: Set up Aurora native integration with Amazon Comprehend. Use SQL functions to extract sentiment analysis.
Giải thích: Đây là giải pháp tối ưu nhất với Aurora ML native integration (hỗ trợ MySQL 5.7/8.0+). Enable qua parameter group (aurora_ml_enabled=1), sau đó dùng SQL nhưSELECT aws_comprehend_detect_sentiment(column_text) FROM table. Comprehend xử lý sentiment ngay trong query, trả về JSON (Sentiment, Score). Least effort: Chỉ vài bước config DB cluster, không code thêm, scale tự động theo Aurora. Hoàn hảo cho workflow hàng ngày! 🏆 -
❌ Phương án SAI: Set up Aurora native integration with Amazon SageMaker. Use SQL functions to extract sentiment analysis.
Giải thích: Aurora ML hỗ trợ SageMaker endpoints qua hàmaws_sagemaker_invoke_endpoint, nhưng effort cao hơn Comprehend: Phải tạo SageMaker model/endpoint (training/deploy custom model sentiment), config endpoint name vào SQL, quản lý lifecycle endpoint. Comprehend managed hơn cho task này, SageMaker phù hợp custom ML chứ không "least effort" cho sentiment cơ bản.
📘 Tài liệu tham khảo (AWS cập nhật mới nhất đến 2026)
- Aurora ML Documentation: Amazon Aurora Machine Learning Integration – Chi tiết SQL functions với Comprehend (ví dụ:
aws_comprehend_detect_sentiment). - Amazon Comprehend: Sentiment Analysis – Managed service, tích hợp Aurora từ re:Invent 2021, hỗ trợ multi-lang/multi-region.
- AWS DMS: DMS for Aurora – Xác nhận effort cao cho export.
- Blog AWS: Unlock ML Insights Directly from Your Database with Aurora ML (cập nhật 2024+).
✅ Lời khuyên DevOps: Test trên Aurora Serverless v2 để scale auto, monitor qua CloudWatch + X-Ray cho latency ML inference! 🚀
Which solution meets these requirements?
- A Create an Amazon ElastiCache cluster. Use a write-through strategy to populate the cache.
- B Create an Amazon ElastiCache cluster. Use a lazy loading strategy to populate the cache.
- C Change the DB instance to Multi-AZ with a standby instance in another AWS Region.
- D Create a read replica of the DB instance. Use the read replica to distribute the read traffic.
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 một ngân hàng (A bank) đang lập kế hoạch sử dụng Amazon RDS for MySQL DB instance. Yêu cầu chính là cơ sở dữ liệu phải hỗ trợ lưu lượng đọc cao (read-intensive traffic) nhưng rất ít truy vấn lặp lại (very few repeated queries).
📘 Giải thích rõ ràng:
- Read-intensive traffic nghĩa là hầu hết các hoạt động là đọc dữ liệu (reads), không phải ghi (writes). RDS MySQL cần scale reads hiệu quả mà không ảnh hưởng đến primary instance.
- Very few repeated queries ngụ ý ít cache hit vì truy vấn không lặp lại nhiều, nên các giải pháp dựa trên caching sẽ kém hiệu quả (ít dữ liệu được tái sử dụng).
- Mục tiêu: Tìm giải pháp scale reads tối ưu, bền vững, phù hợp với RDS MySQL theo kiến thức AWS cập nhật đến 2026 (RDS hỗ trợ read replicas lên đến 15 replicas, cross-AZ/region, với replication lag thấp ~milliseconds).
🛠️ Ngữ cảnh AWS: RDS Read Replicas là giải pháp chuẩn cho read scaling, không phụ thuộc vào cache hits. (Nguồn: AWS RDS Documentation - Read Replicas, cập nhật 2024-2026).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a read replica of the DB instance. Use the read replica to distribute the read traffic.
Lý do chi tiết:
- Read replicas là bản sao chỉ đọc (read-only) của primary DB instance, sử dụng asynchronous replication để offload toàn bộ read traffic.
- Hoàn hảo cho read-intensive vì có thể tạo nhiều replicas (lên đến 15), phân tải reads qua endpoint riêng (ví dụ: app kết nối reader endpoint).
- Không phụ thuộc vào repeated queries – replicas cung cấp dữ liệu full database copy, hiệu quả ngay cả với unique queries.
- MySQL hỗ trợ tốt: Replication lag thấp, promote to primary nếu cần, hỗ trợ cross-region cho global reads (cập nhật AWS 2026).
- Tiết kiệm chi phí: Pay-per-use, auto-scale với Aurora nhưng RDS chuẩn cũng mạnh.
(Nguồn: 📘 AWS RDS Read Replicas & Best Practices for Read-Heavy Workloads).
🔍 Phân tích tất cả các phương án (đúng/sai)
-
Phương án 1: Create an Amazon ElastiCache cluster. Use a write-through strategy to populate the cache.
❌ Sai vì: Write-through cache mọi write vào ElastiCache (Redis/Memcached), nhưng với few repeated queries, cache hit rate thấp → không scale reads hiệu quả. Thêm overhead write (không read-intensive), stale data risk nếu eviction. Không thay thế RDS scaling. (Nguồn: AWS ElastiCache Docs - Write-Through không lý tưởng cho low-repeat reads). -
Phương án 2: Create an Amazon ElastiCache cluster. Use a lazy loading strategy to populate the cache.
❌ Sai vì: Lazy loading chỉ cache on miss (đọc DB rồi cache), nhưng few repeated queries → hầu hết miss → fallback về RDS primary, gây overload reads. Không giải quyết scale reads gốc, chỉ tạm bợ cho repeated queries (mà câu hỏi nói "very few"). (Nguồn: 📘 ElastiCache Caching Strategies – Lazy phù hợp high-repeat, không phải unique reads). -
Phương án 3: Change the DB instance to Multi-AZ with a standby instance in another AWS Region.
❌ Sai vì: Multi-AZ là high availability (HA) với synchronous replication trong cùng region (standby không phục vụ reads, chỉ failover). Cross-region standby là disaster recovery (DR), không offload reads (lag cao ~giây/phút, không real-time). Không scale read-intensive traffic. (Nguồn: AWS RDS Multi-AZ Docs - Standby không cho reads: Multi-AZ Deployments). -
Phương án 4: Create a read replica of the DB instance. Use the read replica to distribute the read traffic.
✅ Đúng vì: Như giải thích trên – scale reads trực tiếp, không cache-dependent, phù hợp MySQL read-intensive với low repeats. Driver kết nối replicas tự động.
Kết luận 💡: Read Replicas là best practice AWS cho workload này (Exam tip DOP-C02). Nếu cần global, dùng Global Databases (Aurora/MySQL). Tham khảo thêm: 📘 AWS Well-Architected Framework - Database Reliability Pillar.
After the database specialist makes this change, when will the instances be assigned to this new parameter group?
- A Instantaneously after the change is made to the parameter group
- B In the next scheduled maintenance window of the DB instances
- C After the DB instances are manually rebooted
- D Within 24 hours after the change is made to the parameter group
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi AWS về Amazon RDS Parameter Groups 📘:
Một chuyên gia cơ sở dữ liệu (database specialist) đang quản lý một nhóm (fleet) các instance Amazon RDS DB sử dụng DB parameter group mặc định (default DB parameter group). Chuyên gia này cần liên kết (associate) một custom parameter group tùy chỉnh với một số instance DB cụ thể.
Câu hỏi trọng tâm: Sau khi thực hiện thay đổi này, khi nào các instance DB sẽ được gán (assigned) vào parameter group mới?
🛠️ Giải thích ngữ cảnh kỹ thuật:
- DB Parameter Group trong AWS RDS là tập hợp các tham số cấu hình (parameters) kiểm soát hành vi của DB engine (như MySQL, PostgreSQL, v.v.), bao gồm dynamic parameters (áp dụng ngay lập tức) và static parameters (yêu cầu reboot để áp dụng).
- Việc associate parameter group mới với RDS instance là một thay đổi modifiable (có thể thay đổi mà không downtime ngay lập tức), nhưng để parameter group hoàn toàn có hiệu lực (take effect) trên instance, đặc biệt với static parameters thường có trong custom group, cần reboot thủ công.
- Đây là kiến thức cốt lõi trong kỳ thi AWS Certified DevOps Engineer Professional (DOP-C02), liên quan đến quản lý RDS configuration. Kiến thức cập nhật đến 2026 vẫn giữ nguyên quy trình này (không có thay đổi lớn từ AWS re:Invent 2025).
Nguồn tham khảo chính 🌐:
- AWS RDS User Guide - Working with Parameter Groups (xem phần "Associating a DB Parameter Group with a DB Instance").
- AWS RDS FAQs (phần Parameter Groups).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: After the DB instances are manually rebooted
Lý do chi tiết 🏆:
- Khi associate custom DB parameter group mới, AWS không tự động reboot instance để tránh downtime. Parameter group được gán ngay lập tức (assigned immediately) về mặt metadata, nhưng các thay đổi static parameters (như
max_connections,innodb_buffer_pool_size) chỉ áp dụng sau khi reboot thủ công. Dynamic parameters có thể apply ngay, nhưng câu hỏi ngụ ý full assignment/effect cho custom group, yêu cầu reboot. - Đây là best practice để kiểm soát downtime, phù hợp với DevOps (zero-downtime deployment). Nếu không reboot, instance vẫn dùng old parameters.
- Xác nhận từ AWS console/logs: Sau associate, status parameter group cập nhật ngay, nhưng
DescribeDBInstanceschỉ show effective sau reboot.
📋 Giải thích tất cả các phương án (đúng/sai)
-
Instantaneously after the change is made to the parameter group ❌
Sai vì: Thay đổi chỉ "instantaneous" với dynamic parameters (một phần nhỏ), nhưng custom group thường chứa static parameters yêu cầu reboot để fully assigned. AWS không apply toàn bộ ngay lập tức để tránh gián đoạn dịch vụ. -
In the next scheduled maintenance window of the DB instances ❌
Sai vì: Maintenance window chỉ dùng cho auto minor version upgrades hoặc backup retention changes, không tự động apply parameter group changes. Parameter group là thay đổi riêng biệt, không phụ thuộc maintenance window. -
After the DB instances are manually rebooted ✅
Đúng vì: Như giải thích trên, manual reboot kích hoạt full load parameter group mới vào DB engine. Đây là bước bắt buộc cho static parameters, đảm bảo config mới có hiệu lực 100%. Thời gian downtime ngắn (vài phút). -
Within 24 hours after the change is made to the parameter group ❌
Sai vì: AWS không có cơ chế tự động apply sau 24 giờ. Propagation chỉ xảy ra nếu dùng Auto Scaling hoặc Multi-AZ failover (nhưng không áp dụng ở đây). Phải reboot thủ công để tránh chờ đợi vô ích.
Lời khuyên DevOps 🚀: Luôn test custom parameter group trên dev instance trước, dùng RDS Proxy để minimize downtime reboot, và monitor qua CloudWatch metrics như CPUUtilization sau reboot!
Server Agent jobs on the Always On AG listener run at 5-minute intervals to synchronize data between the Informix database and the SQL Server database. Users experience hours of stale data after a successful failover to the secondary node with minimal latency.
What should a database specialist do to ensure that users see recent data after a failover?
- A Set TTL to less than 30 seconds for cached DNS values on the Always On AG listener.
- B Break up large transactions into multiple smaller transactions that complete in less than 5 minutes.
- C Set the databases on the secondary node to read-only mode.
- D Create the SQL Server Agent jobs on the secondary node from a script when the secondary node takes over after a failure.
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 đang migrate cơ sở dữ liệu IBM Informix sang Amazon RDS for SQL Server triển khai Multi-AZ với Always On Availability Groups (AGs). Các SQL Server Agent jobs được chạy định kỳ mỗi 5 phút qua Always On AG listener (một DNS endpoint) để đồng bộ dữ liệu từ Informix sang SQL Server.
✅ Vấn đề chính: Sau khi failover thành công sang secondary node với độ trễ tối thiểu (minimal latency), người dùng vẫn gặp phải dữ liệu cũ (stale data) kéo dài hàng giờ. Lý do là DNS cache của AG listener vẫn trỏ đến primary node cũ (bây giờ là secondary), khiến các job sync tiếp tục chạy trên node sai, dẫn đến dữ liệu không được cập nhật kịp thời trên node mới.
🛠️ Mục tiêu: Database specialist cần hành động để đảm bảo người dùng thấy dữ liệu mới nhất ngay sau failover. Giải pháp phải tập trung vào việc giảm thời gian DNS resolution stale mà không ảnh hưởng đến hiệu suất sync. (Kiến thức cập nhật: RDS SQL Server Multi-AZ AGs hỗ trợ failover tự động <60s từ AWS 2023+, nhưng DNS TTL là bottleneck phổ biến theo best practices 2025-2026).
✅ Đáp án đúng:
Set TTL to less than 30 seconds for cached DNS values on the Always On AG listener.
Lý do lựa chọn:
- AG listener là DNS endpoint (ví dụ:
ag-listener.cluster-abc123.us-east-1.rds.amazonaws.com), và sau failover, client/applications cache DNS resolution trỏ đến IP của primary cũ. - AWS khuyến nghị giảm TTL DNS xuống dưới 30 giây (best practice từ RDS docs) để DNS resolver nhanh chóng cập nhật IP mới của secondary (bây giờ là primary), giúp job sync chạy trên node đúng và dữ liệu tươi mới chỉ trong vài chục giây.
- Điều này giải quyết stale data hours mà không thay đổi logic sync hay jobs, phù hợp với Multi-AZ AGs (failover <1 phút). ✅ Hiệu quả cao nhất!
📋 Phân tích tất cả các phương án (Giữ nguyên text gốc tiếng Anh):
✅ Set TTL to less than 30 seconds for cached DNS values on the Always On AG listener.
- Đúng vì: Giảm TTL giúp DNS cache expire nhanh (<30s), client connect đúng primary mới sau failover. AWS xác nhận đây là giải pháp chuẩn cho AG listener trong RDS SQL Server Multi-AZ (giảm stale từ giờ xuống giây).
❌ Break up large transactions into multiple smaller transactions that complete in less than 5 minutes.
- Sai vì: Vấn đề không phải transaction lớn chậm sync (job chạy 5 phút), mà là DNS cache khiến job chạy sai node sau failover. Chia nhỏ transaction chỉ tối ưu throughput, không giải quyết stale data do listener.
❌ Set the databases on the secondary node to read-only mode.
- Sai vì: Trong Always On AGs, secondary databases mặc định read-only (không writable cho sync jobs). Việc set thủ công không thay đổi hành vi failover/DNS, và primary mới vẫn cần writable – không liên quan đến stale data từ cache.
❌ Create the SQL Server Agent jobs on the secondary node from a script when the secondary node takes over after a failure.
- Sai vì: Jobs đã chạy qua listener (proxy đến primary hiện tại), không cần tạo mới trên secondary. Việc script tạo jobs sau failover phức tạp, không tự động, và vẫn gặp DNS cache – vi phạm nguyên tắc automation của RDS AGs.
📘 Tài liệu tham khảo (cập nhật 2026):
- AWS RDS SQL Server Multi-AZ with Always On AGs: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_SQLServerMultiAZ.html (Best Practices: DNS TTL <30s for listeners).
- Failover & Listener: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html#USER_ReadRepl.AlwaysOn (Failover latency <60s, DNS caching warning).
- SQL Server Agent Jobs on AGs: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.Options.AOAG.html.
🛠️ Khuyến nghị thực tế: Kiểm tra CloudWatch metrics (CPU, FailoverEvents) và test failover với TTL thấp để verify! 🚀
What should the database specialist do to accomplish this task?
- A Create a custom DB parameter group and set the wait_timeout parameter value to 900. Associate the DB instance with the custom parameter group.
- B Connect to the MySQL database and run the SET SESSION wait_timeout=900 command.
- C Edit the my.cnf file and set the wait_timeout parameter value to 900. Restart the DB instance.
- D Modify the default DB parameter group and set the wait_timeout parameter value to 900.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi yêu cầu một chuyên gia cơ sở dữ liệu (database specialist) cấu hình một DB instance Amazon RDS for MySQL để đóng các kết nối không tương tác (non-interactive connections) đang không hoạt động (inactive) sau 900 giây.
- wait_timeout là tham số MySQL kiểm soát thời gian tối đa mà một kết nối không hoạt động được giữ mở trước khi bị đóng tự động. Giá trị mặc định thường là 28800 giây (8 giờ), nhưng ở đây cần đặt thành 900 giây (15 phút) để tối ưu hóa tài nguyên, tránh lãng phí kết nối idle.
- Non-interactive connections: Đây là các kết nối không phải từ session tương tác (như từ ứng dụng CLI hoặc script), thường áp dụng cho các kết nối từ pool hoặc batch jobs.
- Mục tiêu: Thay đổi này phải persistent (bền vững) qua các lần restart DB instance, và tuân thủ mô hình quản lý RDS (không can thiệp trực tiếp vào file hệ thống).
📘 Kiến thức cập nhật AWS (đến 2026): RDS hỗ trợ dynamic parameters như wait_timeout (có thể thay đổi mà không cần reboot), nhưng phải qua DB parameter group để áp dụng toàn cục và persistent. Không thể chỉnh sửa trực tiếp file config hoặc parameter group mặc định.
✅ Đáp án đúng
Create a custom DB parameter group and set the wait_timeout parameter value to 900. Associate the DB instance with the custom parameter group.
Lý do lựa chọn:
- RDS không cho phép chỉnh sửa parameter group mặc định (default), phải tạo custom DB parameter group từ family tương ứng (ví dụ:
mysql8.0). - Đặt
wait_timeout = 900trong custom group, sau đó associate (gán) vào DB instance → Thay đổi áp dụng ngay (vì dynamic) và bền vững. - Đây là best practice theo AWS để quản lý config scalable, hỗ trợ multi-instance.
🔍 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, với text gốc giữ nguyên tiếng Anh và giải thích hoàn toàn bằng tiếng Việt:
-
✅ Create a custom DB parameter group and set the wait_timeout parameter value to 900. Associate the DB instance with the custom parameter group.
🛠️ Đúng vì: Phương pháp chuẩn của AWS RDS. Custom parameter group cho phép tùy chỉnh persistent,wait_timeoutlà dynamic nên apply ngay mà không reboot. Hỗ trợ apply cho DB cluster/instance cụ thể. -
❌ Connect to the MySQL database and run the SET SESSION wait_timeout=900 command.
🧩 Sai vì: LệnhSET SESSIONchỉ thay đổi tạm thời cho session hiện tại, không ảnh hưởng toàn cục hay persistent. Sau khi disconnect/reconnect hoặc restart instance, giá trị quay về mặc định. -
❌ Edit the my.cnf file and set the wait_timeout parameter value to 900. Restart the DB instance.
🚫 Sai vì: RDS là managed service, không cho phép truy cập trực tiếp file my.cnf (nằm trong filesystem managed). Chỉ có thể chỉnh qua parameter group; restart cũng không lưu thay đổi. -
❌ Modify the default DB parameter group and set the wait_timeout parameter value to 900.
⚠️ Sai vì: AWS cấm chỉnh sửa default parameter group (read-only). Phải copy thành custom group mới để tránh ảnh hưởng global và đảm bảo tính toàn vẹn.
📚 Tài liệu tham khảo
- AWS RDS User Guide - DB Parameter Groups (Cập nhật 2025: Nhấn mạnh custom groups cho MySQL 8.0+).
- RDS for MySQL Parameters (Xác nhận
wait_timeoutlà dynamic, giá trị min 1s, max theo engine). - AWS re:Post - Best Practices for wait_timeout (Ví dụ thực tế về tuning connections).
Hy vọng phân tích này giúp bạn ôn thi AWS Certified DevOps Engineer Professional hiệu quả! 🚀 Nếu cần thêm ví dụ code Terraform/CLI, hãy hỏi nhé!
What is the MOST operationally efficient solution to meet these requirements?
- A Implement an AWS Lambda function to take a snapshot of the production DB cluster every 2 hours, and copy that snapshot to an Amazon S3 bucket in the DR Region. Restore the snapshot to an appropriately sized DB cluster in the DR Region.
- B Add a cross-Region read replica in the DR Region with the same instance type as the current primary instance. If the read replica in the DR Region needs to be used for production, promote the read replica to become a standalone DB cluster.
- C Create a smaller DB cluster in the DR Region. Configure an AWS Database Migration Service (AWS DMS) task with change data capture (CDC) enabled to replicate data from the current production DB cluster to the DB cluster in the DR Region.
- D Create an Aurora global database that spans two Regions. Use AWS Database Migration Service (AWS DMS) to migrate the existing database to the new global database.
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 giải pháp Disaster Recovery (DR) tối ưu nhất về mặt vận hành cho một cụm cơ sở dữ liệu (DB cluster) Amazon Aurora MySQL dung lượng 3 TB đang chạy production tại Region us-east-1.
Yêu cầu chính:
- Làm cho DB cluster sẵn sàng nhanh chóng (rapidly available) ở Region khác để chịu tải production.
- RTO (Recovery Time Objective) < 2 giờ (thời gian khôi phục phải dưới 2 giờ).
🛠️ Thách thức chính: Với dữ liệu lớn 3 TB, cần giải pháp hiệu quả vận hành cao (operationally efficient), nghĩa là tự động hóa cao, ít can thiệp thủ công, chi phí hợp lý và thời gian failover nhanh. Aurora MySQL hỗ trợ các tính năng replication cross-Region tiên tiến (cập nhật đến 2024-2026, theo AWS RDS Aurora phiên bản mới nhất).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Add a cross-Region read replica in the DR Region with the same instance type as the current primary instance. If the read replica in the DR Region needs to be used for production, promote the read replica to become a standalone DB cluster.
Lý do chọn đáp án này (tối ưu nhất):
- ✅ Aurora hỗ trợ cross-Region read replica trực tiếp từ primary cluster, đồng bộ dữ liệu gần real-time (lag thường <1 phút).
- ✅ Promote replica thành standalone cluster chỉ mất vài phút (RTO << 2 giờ), và instance type giống primary đảm bảo chịu tải production ngay lập tức.
- ✅ Operationally efficient: Setup đơn giản qua console/CLI/API, không cần tool ngoài, tự động replicate binary logs cross-Region.
- 📈 Với 3 TB dữ liệu lớn, replication liên tục hiệu quả hơn snapshot hoặc DMS (tránh downtime dài).
(Kiến thức cập nhật: Aurora MySQL 3.x hỗ trợ cross-Region replicas với binlog replication, cải tiến tốc độ từ 2023).
📋 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 tiếng Anh. Mỗi phương án được đánh giá đúng/sai kèm lý do cụ thể bằng tiếng Việt:
-
Implement an AWS Lambda function to take a snapshot of the production DB cluster every 2 hours, and copy that snapshot to an Amazon S3 bucket in the DR Region. Restore the snapshot to an appropriately sized DB cluster in the DR Region.
❌ Sai: Snapshot 3 TB mất hàng giờ để tạo/copy (cross-Region copy chậm), restore thêm 1-2 giờ nữa → RTO > 2 giờ dễ dàng vượt ngưỡng. Lambda tự động hóa kém (giới hạn timeout 15 phút), không real-time replicate, rủi ro mất dữ liệu >2 giờ. Không efficient cho production DR. -
Add a cross-Region read replica in the DR Region with the same instance type as the current primary instance. If the read replica in the DR Region needs to be used for production, promote the read replica to become a standalone DB cluster.
✅ Đúng (như đã giải thích ở trên): Giải pháp đơn giản, nhanh, RTO thấp. Cross-Region replica dùng Aurora binlog replication đảm bảo dữ liệu đồng bộ cao, promote chỉ cần 1 lệnh API. -
Create a smaller DB cluster in the DR Region. Configure an AWS Database Migration Service (AWS DMS) task with change data capture (CDC) enabled to replicate data from the current production DB cluster to the DB cluster in the DR Region.
❌ Sai: DMS CDC phù hợp migration ban đầu + ongoing replication, nhưng lag có thể >30 phút với 3 TB (throughput giới hạn), instance nhỏ hơn không chịu tải production. Setup phức tạp (task, endpoints, monitoring), không efficient so với native Aurora replication. Failover thủ công, RTO dễ >2 giờ. -
Create an Aurora global database that spans two Regions. Use AWS Database Migration Service (AWS DMS) to migrate the existing database to the new global database.
❌ Sai: Aurora Global Database lý tưởng cho multi-Region read scaling, nhưng yêu cầu create mới và migrate toàn bộ 3 TB qua DMS (mất hàng giờ/ngày, downtime cao). Không "rapidly available" cho DR nhanh, phức tạp hơn cross-Region replica đơn giản. DMS không cần thiết vì Aurora hỗ trợ add secondary trực tiếp mà không migrate.
📘 Tài liệu tham khảo (AWS chính thức, cập nhật 2024-2026)
- Amazon Aurora Cross-Region Read Replicas: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-replication-xregion.html → Chi tiết promote RTO <5 phút.
- Aurora Global Database vs. Cross-Region Replicas: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html → So sánh efficiency.
- AWS DOP-C02 Exam Guide: Replication features trong Domain 4: Automation (cross-Region DR).
🛠️ Khuyến nghị thực tế: Test failover định kỳ với AWS Fault Injection Simulator để đảm bảo RTO.
Which solution should a database specialist provide for the user to authenticate?
- A Deploy Active Directory Federation Services (AD FS) on premises and configure it with an on-premises Active Directory. Set up delegation between the on- premises AD FS and AWS Security Token Service (AWS STS) to map user identities to a role using theAmazonRDSDirectoryServiceAccess managed IAM policy.
- B Establish a forest trust between the on-premises Active Directory and AWS Directory Service for Microsoft Active Directory. Use AWS SSO to configure an Active Directory user delegated to access the databases in RDS for SQL Server.
- C Use Active Directory Connector to redirect directory requests to the company's on-premises Active Directory without caching any information in the cloud. Use the RDS master user credentials to connect to the DB instance and configure SQL Server logins and users from the Active Directory users and groups.
- D Establish a forest trust between the on-premises Active Directory and AWS Directory Service for Microsoft Active Directory. Ensure RDS for SQL Server is using mixed mode authentication. Use the RDS master user credentials to connect to the DB instance and configure SQL Server logins and users from the Active Directory users and groups.
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 công ty có cơ sở dữ liệu SQL Server on-premises sử dụng Active Directory (AD) authentication để người dùng truy cập. Họ đã migrate thành công sang Amazon RDS for SQL Server, nhưng lo ngại về xác thực người dùng (user authentication) trong môi trường AWS Cloud.
📌 Vấn đề cốt lõi: Làm thế nào để duy trì xác thực AD (Windows Authentication) cho RDS SQL Server, thay vì chỉ dùng SQL Server Authentication truyền thống?
🛠️ Yêu cầu giải pháp: Cần một cách tiếp cận chuẩn AWS để tích hợp AD on-premises với RDS, đảm bảo an toàn, không thay đổi lớn kiến trúc, và hỗ trợ theo phiên bản AWS mới nhất (tính đến 2026, RDS for SQL Server hỗ trợ AWS Managed Microsoft AD với forest trust và mixed mode authentication).
✅ Kiến thức chính: RDS SQL Server hỗ trợ Windows Authentication qua tích hợp Kerberos với AD, yêu cầu VPC chung, mixed mode, và tạo SQL logins mapped từ AD users/groups.
✅ Đáp án đúng: Phương án D
Establish a forest trust between the on-premises Active Directory and AWS Directory Service for Microsoft Active Directory. Ensure RDS for SQL Server is using mixed mode authentication. Use the RDS master user credentials to connect to the DB instance and configure SQL Server logins and users from the Active Directory users and groups.
Lý do chọn đáp án này 🏆:
- Đây là phương pháp chuẩn và được AWS khuyến nghị (theo tài liệu RDS for SQL Server tích hợp AD).
- Forest trust giữa on-premises AD và AWS Directory Service for Microsoft AD (Managed AD) cho phép RDS sử dụng AD users/groups một cách liền mạch.
- RDS phải bật mixed mode authentication (kết hợp SQL + Windows auth).
- Sử dụng RDS master user (sa) để kết nối và tạo SQL Server logins/users mapped từ AD (qua T-SQL commands như
CREATE LOGIN [domain\user] FROM WINDOWS;). - Ưu điểm: An toàn, scalable, hỗ trợ Kerberos delegation, không cần proxy/cache phức tạp.
📘 Tài liệu tham khảo: - AWS Docs: Integrating Amazon RDS for SQL Server with Active Directory (cập nhật 2024-2026).
- AWS Directory Service for Microsoft AD.
❌ Phân tích tất cả các phương án
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, kèm lý do đúng/sai bằng tiếng Việt. Tôi đánh dấu ✅ đúng, ❌ sai để dễ theo dõi.
-
[SAI] Deploy Active Directory Federation Services (AD FS) on premises and configure it with an on-premises Active Directory. Set up delegation between the on- premises AD FS and AWS Security Token Service (AWS STS) to map user identities to a role using theAmazonRDSDirectoryServiceAccess managed IAM policy.
❌ Lý do sai: Phương án này dùng AD FS + STS cho federation SAML/OIDC, phù hợp với IAM roles/apps, KHÔNG hỗ trợ Windows Authentication trực tiếp cho RDS SQL Server. RDS cần Kerberos/AD native, không phải token-based. IAM policyAmazonRDSDirectoryServiceAccesschỉ cho phép truy cập Directory Service, không map login SQL. Sẽ thất bại khi connect từ app dùng AD credentials. 🧩 Không khớp yêu cầu migrate AD auth. -
[SAI] Establish a forest trust between the on-premises Active Directory and AWS Directory Service for Microsoft Active Directory. Use AWS SSO to configure an Active Directory user delegated to access the databases in RDS for SQL Server.
❌ Lý do sai: Phần forest trust đúng, nhưng AWS SSO (IAM Identity Center) dùng cho permission federation đến AWS services/IAM, KHÔNG hỗ trợ tạo SQL logins hoặc Windows Auth trực tiếp trên RDS DB instance. AWS SSO không delegate đến SQL Server level; nó chỉ cho console/API access. RDS cần config mixed mode + T-SQL mapping thủ công. 🛠️ Thiếu bước thiết lập RDS auth mode → không authenticate được users. -
[SAI] Use Active Directory Connector to redirect directory requests to the company's on-premises Active Directory without caching any information in the cloud. Use the RDS master user credentials to connect to the DB instance and configure SQL Server logins and users from the Active Directory users and groups.
❌ Lý do sai: AD Connector chỉ là proxy redirect (không cache) cho EC2/SSM/WorkSpaces truy cập on-prem AD qua VPN/Direct Connect, KHÔNG hỗ trợ đầy đủ Windows Authentication cho RDS SQL Server. RDS yêu cầu domain-joined (Managed AD hoặc self-DC), Kerberos ticket từ Directory trong VPC. AD Connector thiếu domain controller thật → không generate SPN/Kerberos cho RDS. Theo AWS docs, chỉ Managed AD + trust mới work. 📌 Sẽ lỗi khi client request AD auth. -
[ĐÚNG] Establish a forest trust between the on-premises Active Directory and AWS Directory Service for Microsoft Active Directory. Ensure RDS for SQL Server is using mixed mode authentication. Use the RDS master user credentials to connect to the DB instance and configure SQL Server logins and users from the Active Directory users and groups.
✅ Lý do đúng: Như phân tích ở trên – toàn diện, chính xác theo best practice AWS. Hỗ trợ full AD integration mà không cần thay đổi app code. Tested trong production nhiều. 🚀
How should a database specialist automate the process of backing up the cluster data in compliance with these policies?
- A Copy the AWS Key Management Service (AWS KMS) customer managed key from the source Region to the destination Region. Set up an AWS Glue job in the source Region to copy the latest snapshot of the Amazon Redshift cluster from the source Region to the destination Region. Use a time-based schedule in AWS Glue to run the job on a daily basis.
- B Create a new AWS Key Management Service (AWS KMS) customer managed key in the destination Region. Create a snapshot copy grant in the destination Region specifying the new key. In the source Region, configure cross-Region snapshots for the Amazon Redshift cluster specifying the destination Region, the snapshot copy grant, and retention periods for the snapshot.
- C Copy the AWS Key Management Service (AWS KMS) customer-managed key from the source Region to the destination Region. Create Amazon S3 buckets in each Region using the keys from their respective Regions. Use Amazon EventBridge (Amazon CloudWatch Events) to schedule an AWS Lambda function in the source Region to copy the latest snapshot to the S3 bucket in that Region. Configure S3 Cross-Region Replication to copy the snapshots to the destination Region, specifying the source and destination KMS key IDs in the replication configuration.
- D Use the same customer-supplied key materials to create a CMK with the same private key in the destination Region. Configure cross-Region snapshots in the source Region targeting the destination Region. Specify the corresponding CMK in the destination Region to encrypt the snapshot.
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 việc tự động hóa sao lưu (backup) dữ liệu của Amazon Redshift cluster để tuân thủ hai yêu cầu chính từ chính sách công ty:
- Mã hóa dữ liệu tại chỗ (at-rest encryption) bằng customer-managed keys (CMK) từ AWS KMS. Nghĩa là cluster phải sử dụng khóa do khách hàng quản lý, không phải khóa mặc định của AWS.
- Kế hoạch phục hồi thảm họa (DR): Sao lưu cluster phải được copy sang một AWS Region khác định kỳ (regular basis), đảm bảo tính sẵn sàng cao và tuân thủ mã hóa.
📌 Bối cảnh kỹ thuật (dựa trên tài liệu AWS cập nhật đến 2026):
- Amazon Redshift hỗ trợ cross-Region snapshots để copy snapshot tự động sang region khác.
- KMS CMK là regional (không thể copy trực tiếp giữa regions), nhưng Redshift cho phép sử dụng snapshot copy grant để chỉ định CMK của destination region cho việc mã hóa snapshot copy.
- Quá trình phải tự động hóa (không thủ công), với retention periods để quản lý lưu trữ.
- Không được sử dụng cách gián tiếp như export sang S3 thủ công vì Redshift quản lý snapshot nội bộ qua API riêng.
Mục tiêu: Tìm cách tối ưu, tuân thủ, tự động sử dụng tính năng native của Redshift và KMS. ✅
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Create a new AWS Key Management Service (AWS KMS) customer managed key in the destination Region. Create a snapshot copy grant in the destination Region specifying the new key. In the source Region, configure cross-Region snapshots for the Amazon Redshift cluster specifying the destination Region, the snapshot copy grant, and retention periods for the snapshot.
🛠️ Lý do chi tiết:
- Tạo CMK mới ở destination Region vì KMS CMK là regional resource (không copy được giữa regions theo docs AWS 2026).
- Snapshot copy grant ở destination chỉ định CMK mới, cho phép Redshift tự động sử dụng key này để mã hóa snapshot copy.
- Ở source Region, enable cross-Region snapshots với tham số: destination Region, copy grant, và retention periods → Tự động hóa hoàn toàn (daily automated snapshots copy).
- Tuân thủ 100%: Mã hóa CMK, DR cross-region, định kỳ (retention tự quản lý).
- Hiệu quả cao: Native feature của Redshift, không cần Lambda/Glue/S3 trung gian.
📘 Tài liệu tham khảo:
❌ Giải thích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI:
Copy the AWS Key Management Service (AWS KMS) customer managed key from the source Region to the destination Region. Set up an AWS Glue job in the source Region to copy the latest snapshot of the Amazon Redshift cluster from the source Region to the destination Region. Use a time-based schedule in AWS Glue to run the job on a daily basis.
🧩 Lý do sai: Không thể copy CMK giữa regions (KMS CMK regional, vi phạm best practice). AWS Glue không hỗ trợ native copy Redshift snapshots cross-region (Glue dành cho ETL data, không phải snapshot management). Phức tạp, không tự động hóa chuẩn, rủi ro lỗi cao. -
✅ Phương án ĐÚNG: (Như đã giải thích ở trên – Native, tuân thủ, tự động hoàn hảo).
-
❌ Phương án SAI:
Copy the AWS Key Management Service (AWS KMS) customer-managed key from the source Region to the destination Region. Create Amazon S3 buckets in each Region using the keys from their respective Regions. Use Amazon EventBridge (Amazon CloudWatch Events) to schedule an AWS Lambda function in the source Region to copy the latest snapshot to the S3 bucket in that Region. Configure S3 Cross-Region Replication to copy the snapshots to the destination Region, specifying the source and destination KMS key IDs in the replication configuration.
🧩 Lý do sai: Lại copy CMK sai (không hỗ trợ). Redshift snapshots không export trực tiếp sang S3 public (chỉ accessible qua console/API Redshift, không phải S3 raw). Lambda/EventBridge phức tạp, không native; CRR S3 chỉ replicate objects, không xử lý snapshot metadata Redshift → Không restore được cluster, vi phạm DR. -
❌ Phương án SAI:
Use the same customer-supplied key materials to create a CMK with the same private key in the destination Region. Configure cross-Region snapshots in the source Region targeting the destination Region. Specify the corresponding CMK in the destination Region to encrypt the snapshot.
🧩 Lý do sai: KMS không cho phép import same private key materials để tạo CMK identical giữa regions (vi phạm security model, private keys unique per CMK). Phải dùng snapshot copy grant mới chỉ định CMK dest (phương án thiếu bước này). Không chính xác theo docs AWS 2026.
Kết luận 🎯: Phương án đúng tận dụng cross-Region snapshot native của Redshift + KMS grant, đảm bảo tự động, an toàn, chi phí thấp nhất cho DR! 🚀