Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
Which solution meets these requirements with the LEAST amount of operational effort?
- A Enable cluster mode in ElastiCache for Redis. Then create multiple clusters across Regions and replicate the cache data by using AWS Database Migration Service (AWS DMS). Promote a cluster in the failover Region to handle production traffic when DR is required.
- B Create a global datastore in ElastiCache for Redis. Then create replica clusters in two other Regions. Promote one of the replica clusters as primary when DR is required.
- C Disable cluster mode in ElastiCache for Redis. Then create multiple replication groups across Regions and replicate the cache data by using AWS Database Migration Service (AWS DMS). Promote a replication group in the failover Region to primary when DR is required.
- D Create a snapshot of ElastiCache for Redis in the primary Region and copy it to the failover Region. Use the snapshot to restore the cluster from the failover Region when DR is required.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh việc xây dựng giải pháp caching sử dụng Amazon ElastiCache for Redis cho một ứng dụng của công ty tài chính lớn có người dùng toàn cầu. Các yêu cầu chính bao gồm:
- Tính sẵn sàng đa vùng (cross-Region): Cache phải khả dụng trên nhiều AWS Regions.
- Replication low-latency và failover cho DR (Disaster Recovery): Sao chép dữ liệu nhanh chóng giữa các vùng với khả năng chuyển đổi tự động hoặc thủ công khi xảy ra sự cố.
- Bảo mật: Mã hóa dữ liệu truyền cross-Region (encryption in-transit).
- Tiêu chí ưu tiên: Giải pháp với ít nỗ lực vận hành nhất (LEAST operational effort).
Mục tiêu là chọn giải pháp tận dụng tính năng native của AWS để tránh thủ công phức tạp, đảm bảo hiệu suất cao và tuân thủ bảo mật. Đây là chủ đề liên quan đến tính năng Global Datastore của ElastiCache for Redis (cập nhật mới nhất AWS năm 2024-2026), hỗ trợ replication cross-Region tự động với latency thấp (<1 giây), failover nhanh và mã hóa TLS mặc định.
📘 Tài liệu tham khảo:
- AWS ElastiCache for Redis - Global Datastore
- AWS Well-Architected Framework - Reliability Pillar (nhấn mạnh multi-Region DR với low effort).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a global datastore in ElastiCache for Redis. Then create replica clusters in two other Regions. Promote one of the replica clusters as primary when DR is required.
Lý do:
🛠️ Giải pháp này sử dụng Global Datastore – tính năng native của ElastiCache for Redis (ra mắt 2021, ổn định đến 2026) – để tạo primary cluster ở một Region và replica clusters ở các Region khác.
- Low-latency replication: Dữ liệu sao chép async với độ trễ <1 giây, hỗ trợ read từ replicas.
- Failover DR: Thủ công promote replica thành primary chỉ trong vài phút, tự động reroute traffic qua Global Endpoint.
- Encryption cross-Region: Tự động mã hóa in-transit bằng TLS 1.2+.
- Least operational effort: Không cần tool ngoài, tự động scale/read scaling, quản lý qua console/CLI/API. Hoàn hảo cho app global với DR tự nhiên.
🔍 Phân tích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên nội dung gốc tiếng Anh. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích rõ ràng bằng tiếng Việt dựa trên tính năng AWS mới nhất.
-
Enable cluster mode in ElastiCache for Redis. Then create multiple clusters across Regions and replicate the cache data by using AWS Database Migration Service (AWS DMS). Promote a cluster in the failover Region to handle production traffic when DR is required.
❌ Sai: Cluster mode chỉ hỗ trợ sharding trong cùng Region, không native cross-Region. AWS DMS (Database Migration Service) không hỗ trợ real-time replication cho Redis (chỉ one-time migration hoặc CDC hạn chế), dẫn đến latency cao, dữ liệu không đồng bộ và nỗ lực cao (cấu hình DMS tasks thủ công, monitor lag). Không mã hóa tự động cross-Region, vi phạm yêu cầu security và least effort. -
Create a global datastore in ElastiCache for Redis. Then create replica clusters in two other Regions. Promote one of the replica clusters as primary when DR is required.
✅ Đúng: Như giải thích ở phần trên. Đây là giải pháp tối ưu nhất với Global Datastore, hỗ trợ tối đa 2 replicas cross-Region, RPO <1s, RTO vài phút. Đáp ứng đầy đủ low-latency, failover, encryption mà không cần code/custom tool. -
Disable cluster mode in ElastiCache for Redis. Then create multiple replication groups across Regions and replicate the cache data by using AWS Database Migration Service (AWS DMS). Promote a replication group in the failover Region to primary when DR is required.
❌ Sai: Disable cluster mode giới hạn scale (chỉ single-node/replication group intra-Region), replication group không native cross-Region. DMS vẫn kém hiệu quả cho Redis real-time (như phương án đầu), đòi hỏi nỗ lực cao: tạo nhiều group thủ công, sync dữ liệu không liền mạch, dễ data loss/inconsistency. Không encryption tự động, không low-latency. -
Create a snapshot of ElastiCache for Redis in the primary Region and copy it to the failover Region. Use the snapshot to restore the cluster from the failover Region when DR is required.
❌ Sai: Snapshot là cơ chế backup point-in-time (manual/automated), copy cross-Region mất thời gian (giờ/ngày tùy size), không replication real-time → latency cao, RTO dài (restore 30p+). Không hỗ trợ read từ secondary trong DR, thiếu low-latency/ongoing sync. Encryption snapshot có nhưng không in-transit liên tục, nỗ lực vận hành lớn (schedule copy/restore thủ công).
🛠️ Khuyến nghị thực tế: Sử dụng Global Datastore kết hợp Route 53 latency-based routing để tự động hóa traffic switch, đảm bảo 99.99% availability. Test failover thường xuyên qua AWS Fault Injection Simulator (FIS) cho DR readiness!
Which RDS storage option meets these requirements MOST cost-effectively?
- A General Purpose SSD storage
- B Provisioned IOPS storage
- C Magnetic storage
- D Throughput Optimized hard disk drives (HDD)
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi AWS RDS liên quan đến việc chọn loại lưu trữ tối ưu chi phí cho migration database SQL Server 4 TB từ on-premises sang Amazon RDS for SQL Server, với workload chính là xử lý batch hàng đêm (nightly batch processing).
📘 Giải thích rõ ràng:
- Bối cảnh: Một chuyên gia database đang lập kế hoạch migrate một instance Microsoft SQL Server dung lượng 4 TB từ môi trường on-premises (tại chỗ) sang RDS for SQL Server. RDS là dịch vụ managed database của AWS, hỗ trợ SQL Server với các tính năng auto-scaling, backup tự động, nhưng cần chọn loại storage phù hợp.
- Yêu cầu chính: Chọn RDS storage option (loại lưu trữ RDS) MOST cost-effectively (tiết kiệm chi phí nhất), phù hợp với workload nightly batch processing – tức là xử lý dữ liệu hàng loạt vào ban đêm, không phải workload liên tục 24/7 với IOPS cao hoặc latency thấp cực kỳ.
- Kiến thức AWS cập nhật đến 2026: RDS for SQL Server hỗ trợ storage types như General Purpose SSD (gp2/gp3 – khuyến nghị gp3 từ 2022), Provisioned IOPS SSD (io1/io2), và Magnetic (legacy, deprecated từ 2016-2020). Không hỗ trợ HDD types như st1/sn1 (Throughput Optimized HDD – dành cho EBS trên EC2, không phải RDS SQL Server). Dung lượng 4 TB phù hợp gp3 (hỗ trợ 20 GB đến 64 TB, baseline 3,000 IOPS/125 MB/s throughput miễn phí). Workload batch nightly không cần IOPS cao liên tục, nên ưu tiên chi phí thấp.
🛠️ Đáp án đúng:
✅ General Purpose SSD storage
Lý do lựa chọn (bằng tiếng Việt): Đây là lựa chọn cost-effective nhất vì cung cấp hiệu suất cân bằng (baseline performance tốt cho batch processing) với giá rẻ hơn Provisioned IOPS (chỉ ~1/3-1/5 giá). gp3 cho phép tùy chỉnh IOPS/throughput lên đến 16,000/1,000 MB/s mà không tốn kém, phù hợp workload không liên tục như batch đêm. Hỗ trợ 4 TB dễ dàng, auto-scaling storage, và là storage mặc định khuyến nghị cho hầu hết SQL Server workloads trên RDS (theo AWS Well-Architected Framework 2024).
📋 Giải thích tất cả các phương án (giữ nguyên văn bản gốc, phân tích bằng tiếng Việt)
-
✅ General Purpose SSD storage
Đúng vì: Tiết kiệm chi phí cao nhất (~$0.08/GB-tháng gp3), hiệu suất đủ cho batch nightly (3,000 IOPS baseline, burst lên 16,000). Phù hợp migration lớn 4 TB, không cần over-provision IOPS. AWS khuyến nghị gp3 làm default từ 2023. -
❌ Provisioned IOPS storage
Sai vì: Rất đắt (~$0.125/GB-tháng + $0.10/IOPS-tháng io2), dành cho high-performance OLTP (transactional) với IOPS ổn định >10,000. Batch nightly không cần provision IOPS cố định, dẫn đến lãng phí chi phí lớn cho 4 TB. -
❌ Magnetic storage
Sai vì: Loại legacy (standard), deprecated từ 2020, không hỗ trợ mới cho SQL Server trên RDS (chỉ legacy instances). Hiệu suất kém (100 IOPS cố định), chi phí thấp nhưng không scalable cho 4 TB batch processing hiện đại, AWS không khuyến khích migrate sang. -
❌ Throughput Optimized hard disk drives (HDD)
Sai vì: Không được hỗ trợ trên RDS for SQL Server (st1/sn1 chỉ cho EBS volumes trên EC2, throughput-oriented workloads như data warehouse S3). RDS SQL Server bắt buộc SSD-based storage, HDD không tương thích và kém hiệu suất ngẫu nhiên cho database.
📚 Tài liệu tham khảo (AWS cập nhật mới nhất 2026)
- AWS RDS Storage Documentation: Amazon RDS for SQL Server Storage – Chi tiết gp3 vs io2.
- RDS Pricing Page: RDS for SQL Server Pricing – So sánh chi phí gp3 ($0.08/GB) vs io2.
- AWS Well-Architected Framework (Database Lens, 2024): Khuyến nghị General Purpose SSD cho batch workloads.
- Deprecation Notice: Magnetic Storage Retirement – gp3 là future-proof.
🧩 Kết luận: Lựa chọn ✅ General Purpose SSD storage đảm bảo hiệu suất + chi phí thấp, phù hợp DevOps best practices cho migration! 🚀
An analysis application is running queries against the Timestream database and is focusing on data from the current week. A database specialist needs to optimize the query costs of the analysis application.
Which solution will meet these requirements?
- A Ensure that queries contain whole records over the relevant time range.
- B Use time range, measure name, and dimensions in the WHERE clause of the query.
- C Avoid canceling any query after the query starts running.
- D Implement exponential backoff in the application.
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 Amazon Timestream – một dịch vụ cơ sở dữ liệu time-series được thiết kế tối ưu cho dữ liệu IoT, như dữ liệu từ cảm biến trên máy pha cà phê. Nhà sản xuất lắp cảm biến IoT vào tất cả máy, ứng dụng IoT core ghi measurements (đo lường) cho mỗi record vào Timestream. Mỗi record có multiple dimensions (các chiều dữ liệu như machine_id, location) và multiple measures (các giá trị đo lường với nhiều measure names và values, ví dụ: temperature=25, pressure=1.2).
Ứng dụng phân tích query dữ liệu từ Timestream, tập trung vào dữ liệu tuần hiện tại. Chuyên gia database cần tối ưu hóa chi phí query của ứng dụng này.
📘 Yếu tố chính cần lưu ý về Timestream (cập nhật đến 2026):
- Timestream tính phí query dựa trên lượng dữ liệu scanned (dữ liệu được quét để xử lý query), không phải kết quả trả về.
- Query chỉ scan dữ liệu memory store (dữ liệu gần nhất, như tuần hiện tại) để tối ưu hiệu suất và chi phí, nhưng vẫn cần filter hiệu quả để giảm scan.
- Best practices: Sử dụng WHERE clause với time range, dimensions, và measure names để filter sớm, giảm dữ liệu scanned đáng kể (có thể lên đến 90% tiết kiệm theo docs AWS).
Mục tiêu: Giảm chi phí bằng cách query chỉ dữ liệu cần thiết từ memory store (tuần hiện tại).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use time range, measure name, and dimensions in the WHERE clause of the query.
Lý do:
- Trong Timestream, query optimizer chỉ scan dữ liệu khớp với WHERE clause chứa time range (ví dụ: time between '2024-01-01' and '2024-01-07'), measure name (ví dụ: measure_name = 'temperature'), và dimensions (ví dụ: dimension machine_id = 'CM001').
- Điều này filter dữ liệu sớm (early filtering), giảm lượng dữ liệu scanned từ memory store, từ đó giảm chi phí query tối đa. Đây là best practice chính thức của AWS cho multi-measure/multi-dimension data, đặc biệt với dữ liệu tuần hiện tại (memory store ưu tiên).
- 🛠️ Ví dụ query tối ưu:
SELECT * FROM table WHERE time BETWEEN ago(7d) AND now() AND measure_name = 'temperature' AND machine_id = 'CM001'; - Theo AWS docs 2024-2026, cách này tiết kiệm chi phí scan lên đến hàng chục lần so với query không filter.
🧩 Giải thích tất cả các phương án (đúng/sai)
-
✅ Use time range, measure name, and dimensions in the WHERE clause of the query.
Đúng: Như giải thích trên, đây là cách tối ưu nhất để filter sớm, giảm dữ liệu scanned từ memory store. Áp dụng cho multi-measure data, giúp query chỉ xử lý dữ liệu tuần hiện tại cần thiết, tiết kiệm chi phí hiệu quả. -
❌ Ensure that queries contain whole records over the relevant time range.
Sai: Phương án này không liên quan đến tối ưu chi phí Timestream. "Whole records" ám chỉ việc query toàn bộ record thay vì aggregate, nhưng Timestream không yêu cầu điều này. Nó có thể tăng scan nếu không filter WHERE, dẫn đến chi phí cao hơn. Không phải best practice. -
❌ Avoid canceling any query after the query starts running.
Sai: Ngược lại, AWS khuyến nghị cancel query nếu phát hiện scan quá nhiều (qua DescribeQuery API). Cancel giúp tránh phí scan đầy đủ, đặc biệt với query lớn. Tránh cancel sẽ tăng chi phí không cần thiết. -
❌ Implement exponential backoff in the application.
Sai: Exponential backoff dùng cho retry throttled requests (như API limits), không trực tiếp tối ưu chi phí query Timestream. Nó chỉ giúp xử lý lỗi, không giảm dữ liệu scanned. Không giải quyết vấn đề query tuần hiện tại.
📘 Tài liệu tham khảo (AWS cập nhật mới nhất đến 2026)
- Amazon Timestream Best Practices for Query Optimization – Chi tiết về WHERE clause với time/dimensions/measures.
- Timestream Pricing – Phí dựa trên dữ liệu scanned (Query Request Units).
- Timestream Query Optimization Whitepaper – Nhấn mạnh early filtering cho IoT workloads.
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần ví dụ code query cụ thể, hãy hỏi thêm.
Which solution will meet these requirements?
- A Modify the DB instance to update the encryption key. Perform this update immediately without waiting for the next scheduled maintenance window.
- B Export the database to an Amazon S3 bucket. Import the data to an existing DB instance by using the export file. Specify a new encryption key during the import process.
- C Create a manual snapshot of the DB instance. Create an encrypted copy of the snapshot by using a new encryption key. Create a new DB instance from the encrypted snapshot.
- D Create a manual snapshot of the DB instance. Restore the snapshot to a new DB instance. Specify a new encryption key during the restoration process.
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 chuyên gia cơ sở dữ liệu (database specialist) cần thay thế ngay lập tức khóa mã hóa (encryption key) cho một instance Amazon RDS DB để đảm bảo an ninh dữ liệu. 🔒 Yêu cầu chính là hành động ngay lập tức (immediate action) mà không làm gián đoạn hoạt động hiện tại quá nhiều.
Amazon RDS hỗ trợ mã hóa dữ liệu tại chỗ (at-rest encryption) bằng AWS KMS keys. Tuy nhiên, không thể thay đổi trực tiếp KMS key trên DB instance đang chạy vì tính chất bảo mật và kiến trúc của RDS. Giải pháp phải liên quan đến snapshot để tạo bản sao với key mới, sau đó khôi phục vào instance mới. Điều này dựa trên tài liệu AWS RDS mới nhất (cập nhật đến 2026), nơi RDS vẫn duy trì quy trình này cho hầu hết các DB engine như MySQL, PostgreSQL, Oracle, SQL Server (trừ một số tính năng đặc biệt của Aurora). 📘
Nguồn tham khảo chính:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a manual snapshot of the DB instance. Create an encrypted copy of the snapshot by using a new encryption key. Create a new DB instance from the encrypted snapshot.
Lý do: 🛠️ Đây là quy trình chuẩn và chính thức được AWS khuyến nghị để thay thế KMS key ngay lập tức.
- Tạo manual snapshot từ DB hiện tại (không ảnh hưởng đến production).
- Tạo bản sao snapshot được mã hóa bằng KMS key mới (copy snapshot hỗ trợ thay đổi key).
- Khôi phục từ bản sao snapshot để tạo DB instance mới với key mới. Quy trình này immediate (có thể thực hiện ngay mà không chờ maintenance window), đảm bảo dữ liệu an toàn và không mất dữ liệu. Sau đó, chuyển traffic sang instance mới qua DNS hoặc application logic. Hoàn hảo cho DevOps Engineer! 🚀
📋 Giải thích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI: Modify the DB instance to update the encryption key. Perform this update immediately without waiting for the next scheduled maintenance window.
Giải thích: Không thể thực hiện! AWS RDS không hỗ trợ modify trực tiếp KMS key trên DB instance đang chạy, dù immediate hay trong maintenance window. Thay đổi này sẽ yêu cầu downtime lớn hoặc không khả dụng. Đây là hạn chế thiết kế của RDS để tránh rủi ro bảo mật. (Xác nhận trong AWS Console và CLI: parameterkms-key-idchỉ set lúc tạo instance). -
❌ Phương án SAI: Export the database to an Amazon S3 bucket. Import the data to an existing DB instance by using the export file. Specify a new encryption key during the import process.
Giải thích: Không phù hợp vì không immediate và phức tạp. Native export/import chỉ khả dụng cho Aurora snapshots to S3 (tính năng preview đến 2026), không phải tất cả engine RDS. Quá trình export/import tốn thời gian (giờ/ngày), yêu cầu dump data thủ công, và có downtime lớn. Không phải giải pháp chuẩn cho "immediate action". 🕒 -
✅ Phương án ĐÚNG: Create a manual snapshot of the DB instance. Create an encrypted copy of the snapshot by using a new encryption key. Create a new DB instance from the encrypted snapshot.
Giải thích: Như đã phân tích ở trên. Đây là cách duy nhất an toàn, immediate và không mất dữ liệu. Snapshot copy inherit key mới, restore tạo instance mới với key đó. Hỗ trợ tất cả engine RDS Multi-AZ. Thời gian: snapshot nhanh (gần real-time), copy ~phút đến giờ tùy size. 💯 -
❌ Phương án SAI: Create a manual snapshot of the DB instance. Restore the snapshot to a new DB instance. Specify a new encryption key during the restoration process.
Giải thích: Sai vì không thể specify KMS key mới lúc restore snapshot gốc. Snapshot inherit key từ source DB, restore sẽ dùng key cũ. Chỉ khi copy snapshot mới cho phép thay key. Nếu thử specify key khác, AWS sẽ báo lỗi "key mismatch". Đây là bẫy phổ biến trong exam DOP-C02! ⚠️
Lời khuyên DevOps: Sau khi tạo instance mới, sử dụng Route 53 hoặc ALB để failover zero-downtime. Test với AWS Fault Injection Simulator để verify! 🧪 Nguồn bổ sung: AWS Well-Architected Framework - Reliability Pillar.
Which architecture will meet these requirements in the MOST operationally efficient way?
- A Deliver the player data to an Amazon Timestream database. Create an Amazon ElastiCache for Redis cluster. Configure the Lambda function to store the results in Redis. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the Redis cluster for the leaderboard data.
- B Deliver the player data to an Amazon Timestream database. Create an Amazon DynamoDB table. Configure the Lambda function to store the results in DynamoDCreate a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the DynamoDB table for the leaderboard data.
- C Deliver the player data to an Amazon Aurora MySQL database. Create an Amazon DynamoDB table. Configure the Lambda function to store the results in MySQL. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the DynamoDB table for the leaderboard data.
- D Deliver the player data to an Amazon Neptune database. Create an Amazon ElastiCache for Redis cluster. Configure the Lambda function to store the results in Redis. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the Redis cluster for the leaderboard data.
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 thiết kế một kiến trúc AWS tối ưu về mặt vận hành (MOST operationally efficient) cho hệ thống leaderboard của một game mobile. Các yêu cầu chính bao gồm:
- Quy mô: Lên đến 25.000 người dùng đồng thời (concurrent users) trong 2 tuần đầu sau khi ra mắt.
- Chức năng leaderboard: Hiển thị top 10 người chơi có điểm cao nhất trong 24 giờ qua.
- Xử lý: Sử dụng AWS Lambda để tính toán leaderboard, thời gian xử lý khoảng 10 giây.
- Yêu cầu freshness: Dữ liệu leaderboard không quá 1 phút cũ (tức là phải cập nhật định kỳ <=1 phút).
- Thách thức: Cần xử lý dữ liệu điểm số theo thời gian (time-series data), truy vấn nhanh với high concurrency, và tối ưu chi phí/vận hành (ít quản lý thủ công, auto-scale).
Mục tiêu là chọn giải pháp managed services phù hợp nhất: Lưu trữ dữ liệu gốc (player scores), cache kết quả leaderboard cho truy vấn nhanh, và tự động hóa cập nhật qua scheduler. Kiến thức AWS cập nhật đến 2026 nhấn mạnh Amazon Timestream (time-series DB managed, lý tưởng cho metrics theo thời gian với window queries), ElastiCache for Redis (in-memory caching với latency <1ms, perfect cho leaderboards), và Amazon EventBridge (serverless scheduler cho cron jobs).
📘 Tài liệu tham khảo:
- AWS Timestream: docs.aws.amazon.com/timestream/latest/developerguide/what-is.html (tối ưu queries trên time windows như "last 24h").
- ElastiCache Redis: aws.amazon.com/elasticache/redis/ (leaderboard patterns).
- EventBridge: docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Deliver the player data to an Amazon Timestream database. Create an Amazon ElastiCache for Redis cluster. Configure the Lambda function to store the results in Redis. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the Redis cluster for the leaderboard data.
🛠️ Lý do chọn đáp án này là MOST operationally efficient:
- Timestream: Managed time-series DB, tự động nén dữ liệu theo thời gian, hỗ trợ SQL queries hiệu quả trên window "last 24h" (top 10 scores), scale theo workload mà không cần quản lý index thủ công.
- ElastiCache Redis: Cache kết quả leaderboard (top 10) với latency sub-millisecond, chịu tải 25k concurrent reads dễ dàng (sorted sets cho leaderboards native).
- EventBridge + Lambda: Serverless scheduler chạy Lambda mỗi phút (refresh <1 phút), Lambda chỉ mất 10s nên fit hoàn hảo.
- Tổng thể: Toàn bộ managed, zero-downtime scale, chi phí pay-per-use, không cần provision servers/indexes phức tạp. Phù hợp DOP best practices (IaC, monitoring via CloudWatch).
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá dựa trên tính phù hợp với time-series data, latency, scale, và operational efficiency (cập nhật AWS 2026).
-
✅ Deliver the player data to an Amazon Timestream database. Create an Amazon ElastiCache for Redis cluster. Configure the Lambda function to store the results in Redis. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the Redis cluster for the leaderboard data.
Đúng 🏆: Như giải thích trên, kết hợp hoàn hảo Timestream (time-series lưu trữ gốc) + Redis (cache nhanh). Truy vấn leaderboard từ Redis siêu tốc, refresh mỗi phút via EventBridge. Không lãng phí tài nguyên, scale tự động cho 25k users. -
❌ Deliver the player data to an Amazon Timestream database. Create an Amazon DynamoDB table. Configure the Lambda function to store the results in DynamoDCreate a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the DynamoDB table for the leaderboard data.
Sai: Mặc dù dùng Timestream tốt cho nguồn dữ liệu, nhưng DynamoDB không phải cache lý tưởng cho leaderboards. DynamoDB là NoSQL key-value, latency ~10ms (chậm hơn Redis <1ms), cần GSI phức tạp cho "top 10 last 24h". Với 25k concurrent reads, tốn RCU/WCU cao, kém efficient hơn Redis (không hỗ trợ sorted sets native như Redis). -
❌ Deliver the player data to an Amazon Aurora MySQL database. Create an Amazon DynamoDB table. Configure the Lambda function to store the results in MySQL. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the DynamoDB table for the leaderboard data.
Sai nghiêm trọng 🔴: Aurora MySQL là relational DB, KHÔNG phù hợp time-series (queries "last 24h top 10" cần index phức tạp, chậm với high writes từ 25k users). Lưu kết quả vào MySQL nhưng query từ DynamoDB? Mâu thuẫn logic (text có lỗi typo nhưng ý rõ: store in MySQL, query DynamoDB – không nhất quán). Latency MySQL/DynamoDB không optimal cho real-time leaderboards. -
❌ Deliver the player data to an Amazon Neptune database. Create an Amazon ElastiCache for Redis cluster. Configure the Lambda function to store the results in Redis. Create a scheduled event with Amazon EventBridge to invoke the Lambda function once every minute. Reconfigure the game server to query the Redis cluster for the leaderboard data.
Sai: Neptune là graph DB (cho relationships như social graphs), KHÔNG dành cho time-series scores (queries Gremlin/SPARQL kém hiệu quả trên time windows, tốn tài nguyên). Dù Redis tốt cho cache, nguồn dữ liệu Neptune làm toàn bộ pipeline inefficient, tăng chi phí và độ phức tạp vận hành.
Kết luận 🎯: Giải pháp đúng tận dụng specialized managed services (Timestream + Redis) để đạt low-latency, high-scale, minimal ops overhead – đúng tinh thần DevOps Professional!
A database specialist must change the design of the tables to improve the reporting performance. All the changes must be applied dynamically. The changes must have the least possible impact on users and must optimize the overall table size.
Which solution will meet these requirements?
- A Use the STL_SCAN view to understand how the tables are getting scanned. Identify the columns that are used in filter and group by conditions. Create a temporary table with the identified columns as sort keys and compression as Zstandard (ZSTD) by copying the data from the original table. Drop the original table. Give the temporary table the same name that the original table had.
- B Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Convert the recommended columns from Redshift Advisor into sort keys with compression encoding set to RAW. Set the rest of the column compression encoding to AZ64.
- C Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Convert the recommended columns from Redshift Advisor into sort keys with compression encoding set to LZO. Set the rest of the column compression encoding to Zstandard (ZSTD).
- D Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Create a deep copy of the table with the identified columns as sort keys and compression for all columns as Zstandard (ZSTD) by using a bulk insert. Drop the original table. Give the copy table the same name that the original table had.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi mô tả một công ty bán lẻ sử dụng Amazon Redshift làm data warehouse dung lượng 1 PB. Các workload phân tích chạy trên cluster Redshift, nhưng các bảng (đặc biệt là transaction fact tables) phát triển nhanh chóng, dẫn đến hiệu suất báo cáo hàng ngày kém.
Database specialist cần thiết kế lại bảng để cải thiện performance báo cáo, với các yêu cầu chính:
- ✅ Áp dụng động (dynamically) – không gián đoạn lớn.
- ✅ Tác động tối thiểu đến người dùng (least impact).
- ✅ Tối ưu kích thước bảng tổng thể (optimize overall table size).
Chủ đề tập trung vào tối ưu hóa sort keys, compression encoding dựa trên phân tích query, sử dụng công cụ như EXPLAIN plan và Redshift Advisor (cập nhật mới nhất AWS 2024-2026 hỗ trợ AZ64 compression siêu hiệu quả).
📘 Nguồn tham khảo:
- Amazon Redshift Best Practices
- Redshift Advisor Recommendations
- Compression Encodings (AZ64 mới nhất)
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Convert the recommended columns from Redshift Advisor into sort keys with compression encoding set to RAW. Set the rest of the column compression encoding to AZ64.
Lý do chi tiết 🛠️:
- Phân tích query chuẩn xác: Sử dụng EXPLAIN plan để xem execution plan, kết hợp Redshift Advisor (tự động recommend sort keys/dist keys dựa trên workload thực tế, cập nhật 2024+).
- Tối ưu sort keys: Chọn columns thường dùng trong filter/GROUP BY làm sort keys (giảm scan blocks, cải thiện performance 10-100x cho analytical queries).
- Compression lý tưởng: RAW cho sort keys (dữ liệu đã sort không cần compress mạnh, tránh overhead I/O/decode; AWS recommend). AZ64 cho các cột còn lại (compression mới nhất 2023, nhanh gấp 3x ZSTD/LZO, tỷ lệ nén cao nhất ~75% cho numeric/text, tiết kiệm storage tối đa trên 1 PB data).
- Áp dụng động, ít impact: Dùng ALTER TABLE để convert sort keys + VACUUM FULL hoặc ANALYZE (không cần deep copy toàn bộ bảng, chỉ rebuild index dần dần trong background, downtime <5% cho large tables). Hoàn hảo cho production với end-users đang chạy reports.
📋 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 tiếng Anh). Mỗi phương án được đánh giá đúng/sai với lý do bằng tiếng Việt:
-
Use the STL_SCAN view to understand how the tables are getting scanned. Identify the columns that are used in filter and group by conditions. Create a temporary table with the identified columns as sort keys and compression as Zstandard (ZSTD) by copying the data from the original table. Drop the original table. Give the temporary table the same name that the original table had.
❌ SAI 🛠️: STL_SCAN chỉ xem lịch sử scan (không chính xác bằng EXPLAIN/Advisor). Deep copy temp table + DROP gây downtime lớn (hàng giờ/ngày cho 1 PB), impact cao đến users. ZSTD kém AZ64 (nén chỉ ~50-60%, chậm hơn). Không động, vi phạm yêu cầu. -
Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Convert the recommended columns from Redshift Advisor into sort keys with compression encoding set to RAW. Set the rest of the column compression encoding to AZ64.
✅ ĐÚNG 🎯: Như giải thích trên – phân tích chuẩn, ALTER động + RAW/AZ64 tối ưu performance/storage (AZ64 là best practice 2026), least impact. -
Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Convert the recommended columns from Redshift Advisor into sort keys with compression encoding set to LZO. Set the rest of the column compression encoding to Zstandard (ZSTD).
❌ SAI 📉: EXPLAIN/Advisor tốt, nhưng LZO (cũ, nhanh nhưng nén kém ~40%) và ZSTD (tốt nhưng chậm/decode lâu hơn AZ64 ~30%) không tối ưu size/performance như RAW/AZ64. Không phải best practice mới nhất. -
Run an explain plan to analyze the queries on the tables. Consider recommendations from Amazon Redshift Advisor. Identify the columns that are used in filter and group by conditions. Create a deep copy of the table with the identified columns as sort keys and compression for all columns as Zstandard (ZSTD) by using a bulk insert. Drop the original table. Give the copy table the same name that the original table had.
❌ SAI 🚫: EXPLAIN/Advisor chuẩn, nhưng deep copy + bulk insert + DROP (dùng INSERT INTO new_table SELECT *) tốn kém (double storage tạm thời, downtime cao cho 1 PB), impact lớn đến users. ZSTD all columns không lý tưởng (sort keys nên RAW để sort hiệu quả).
Tóm tắt nhanh 💡: Đáp án đúng cân bằng dynamic ALTER + compression hiện đại (AZ64/RAW), phù hợp Redshift RA3/concurrency scaling 2026!
A database administrator needs to provide the reporting application with access to the production database. The company has already configured VPC peering between the production account and developer account. The company has also updated the route tables in both accounts with the necessary entries to correctly set up VPC peering.
What must the database administrator do to finish providing connectivity to the reporting application?
- A Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.
- B Add an outbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.
- C Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on all TCP ports. Add an inbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.
- D Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on all TCP ports.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh việc thiết lập kết nối an toàn giữa một ứng dụng báo cáo chạy trên Amazon EC2 instance trong tài khoản developer (isolated) và cơ sở dữ liệu Amazon Aurora PostgreSQL trong tài khoản production.
-
Bối cảnh:
- Ứng dụng chỉ truy xuất dữ liệu vào giờ không cao điểm.
- Đội ngũ bảo mật yêu cầu tuân thủ best security practices của AWS (như least privilege, không mở rộng port không cần thiết).
- Đã thiết lập VPC peering giữa hai tài khoản và cập nhật route tables ở cả hai bên để định tuyến traffic đúng cách.
-
Vấn đề cần giải quyết: Database administrator (DB admin) phải hoàn tất cấu hình Security Groups (SG) để EC2 (client) có thể kết nối đến Aurora DB (server) qua port 5432 (port mặc định của PostgreSQL).
-
Kiến thức cốt lõi (cập nhật AWS 2026):
- VPC peering cho phép giao tiếp giữa VPC cross-account mà không cần VPN/Gateway.
- Security Groups là stateful firewalls: Traffic outbound tự động cho phép response inbound tương ứng, nhưng phải cấu hình chính xác inbound/outbound theo hướng kết nối.
- Client (EC2) → Server (DB):
- SG của DB cần inbound rule từ source CIDR của VPC developer.
- SG của EC2 cần outbound rule đến destination CIDR của VPC production (trên port cụ thể để tuân thủ least privilege).
- Aurora PostgreSQL hỗ trợ kết nối qua port 5432, và best practice là hạn chế CIDR + port cụ thể.
📘 Tài liệu tham khảo:
- AWS VPC Peering Guide: https://docs.aws.amazon.com/vpc/latest/peering/peering-scenarios.html#cross-account-peering
- Security Groups for EC2/Aurora: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules.html (cập nhật 2023-2026, nhấn mạnh stateful và cross-account rules).
- Aurora PostgreSQL Networking: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.
🛠️ Lý do chi tiết:
- Inbound rule trên DB Security Group (prod account): Cho phép traffic từ source = VPC CIDR của developer account vào port 5432 (chỉ PostgreSQL, least privilege). Đây là yêu cầu bắt buộc vì DB là server nhận kết nối.
- Outbound rule trên EC2 Security Group (dev account): Cho phép traffic đến destination = VPC CIDR của production account trên port 5432. Vì SG stateful, response từ DB sẽ tự động được phép inbound về EC2 mà không cần rule riêng.
- Hoàn hảo tuân thủ best security practices: Sử dụng CIDR peering chính xác, port cụ thể, không mở rộng không cần thiết. Đã có route tables nên chỉ cần SG để kiểm soát firewall.
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh:
-
✅ Đúng (Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.)
🧩 Phân tích: Như giải thích ở trên, đây là cấu hình chuẩn cho client-server qua VPC peering. Inbound DB + Outbound EC2 trên port 5432 chính xác, an toàn và hiệu quả. -
❌ Sai (Add an outbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.)
🧩 Phân tích: Sai cơ bản vì DB Security Group (server) không cần outbound rule từ source developer CIDR – outbound dùng cho traffic đi ra từ DB, không phải nhận kết nối vào. Chỉ outbound trên EC2 là đúng một phần, nhưng thiếu inbound DB nên traffic sẽ bị chặn ngay từ đầu. -
❌ Sai (Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on all TCP ports. Add an inbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on port 5432.)
🧩 Phân tích: Phần inbound DB đúng hướng nhưng mở all TCP ports quá rộng, vi phạm least privilege (best practice yêu cầu chỉ port 5432). Phần thứ hai sai hoàn toàn: EC2 SG (client) cần outbound đến prod CIDR, không phải inbound từ prod – inbound trên EC2 sẽ không kiểm soát kết nối khởi tạo từ EC2 ra ngoài. -
❌ Sai (Add an inbound security group rule to the database security group that allows access from the developer account VPC CIDR on port 5432. Add an outbound security group rule to the EC2 security group that allows access to the production account VPC CIDR on all TCP ports.)
🧩 Phân tích: Phần inbound DB đúng hoàn hảo. Nhưng outbound EC2 mở all TCP ports quá rộng, không tuân thủ best security practices (chỉ cần port 5432). Điều này tạo lỗ hổng bảo mật lớn, cho phép EC2 gửi traffic không mong muốn đến toàn bộ prod VPC.
🎯 Kết luận: Cấu hình đúng đảm bảo kết nối một chiều an toàn, chỉ trong giờ non-peak, và dễ audit qua CloudTrail/VPC Flow Logs! Nếu triển khai, test bằng telnet hoặc psql từ EC2 đến DB endpoint.
Which solution will meet these requirements?
- A Amazon RDS for MariaDB with cross-Region read replicas
- B Amazon RDS with a Multi-AZ deployment
- C Amazon DynamoDB global tables
- D Amazon DynamoDB with a global secondary index (GSI)
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một công ty toàn cầu đang xây dựng ứng dụng cần tính sẵn sàng cao (highly available), với yêu cầu nghiêm ngặt về RTO (Recovery Time Objective - thời gian khôi phục) và RPO (Recovery Point Objective - thời gian mất dữ liệu) dưới 5 phút. Đồng thời, cần một cơ sở dữ liệu (database) hỗ trợ cấu hình active-active (cả hai vùng hoạt động đồng thời, không phải standby) và đồng bộ dữ liệu gần thời gian thực (near real-time synchronization) giữa các bảng dữ liệu ở nhiều AWS Regions.
🛠️ Yêu cầu cốt lõi:
- Active-active: Mọi region đều có thể đọc/ghi dữ liệu độc lập, không có primary-secondary.
- Near real-time sync: Dữ liệu replicate nhanh chóng (thường vài giây), đảm bảo RPO <5 phút.
- High availability multi-region: Chịu lỗi region mà không gián đoạn lớn.
Đây là kịch bản điển hình cho ứng dụng toàn cầu cần zero-downtime failover và data consistency thấp (eventual consistency là chấp nhận được).
✅ Đáp án đúng: Amazon DynamoDB global tables
Lý do lựa chọn:
- DynamoDB global tables là giải pháp native multi-master (active-active) của AWS, tự động replicate dữ liệu near real-time (thường dưới 1 giây ở điều kiện lý tưởng) qua nhiều AWS Regions.
- Đảm bảo RTO và RPO <5 phút vì replication liên tục, không cần manual failover – ứng dụng có thể đọc/ghi bất kỳ region nào mà dữ liệu tự sync.
- Hỗ trợ multi-region writes với eventual consistency, phù hợp ứng dụng global như e-commerce hoặc gaming.
- Cập nhật 2026: Vẫn là tính năng chuẩn, với cải tiến như point-in-time recovery (PITR) và on-demand capacity cho scalability cao hơn (AWS re:Invent 2024-2025 announcements).
📋 Phân tích tất cả các phương án
-
Amazon RDS for MariaDB with cross-Region read replicas ❌
Sai vì: Cross-Region read replicas chỉ hỗ trợ read-only ở region phụ, không phải active-active (không ghi được ở replica). Replication là asynchronous, có thể lag >5 phút dưới tải cao, không đạt RPO <5 phút. Failover cần manual promotion, tăng RTO. RDS MariaDB không native hỗ trợ multi-region writes. -
Amazon RDS with a Multi-AZ deployment ❌
Sai vì: Multi-AZ chỉ trong một region (standby replica synchronous), không cross-region. Không hỗ trợ active-active multi-region, replication chỉ intra-region. RTO thấp (~1-2 phút) nhưng chỉ cho single region failure, không đáp ứng global sync. -
Amazon DynamoDB global tables ✅
Đúng vì: Như giải thích trên, đây là unique solution cho active-active multi-region với automatic bi-directional replication near real-time. RTO/RPO gần zero, scale global seamless. -
Amazon DynamoDB with a global secondary index (GSI) ❌
Sai vì: GSI chỉ là index phân tán cho query performance trên single table/region, không replicate dữ liệu cross-region hay active-active. Không giải quyết sync multi-region; vẫn cần global tables để multi-region.
📘 Tài liệu tham khảo (AWS cập nhật đến 2026)
- DynamoDB Global Tables: AWS Docs - Global Tables – Chi tiết RTO/RPO <1 phút thực tế.
- RDS Limitations: AWS RDS Multi-AZ & Read Replicas – Xác nhận không active-active cross-region.
- AWS Well-Architected Framework - Reliability Pillar: Khuyến nghị global tables cho multi-region active-active (whitepaper 2025).
- Best Practices: AWS re:Post & Blogs (e.g., "DynamoDB Global Tables for Low-Latency Global Apps", 2024).
🛠️ Lời khuyên DevOps: Sử dụng DynamoDB global tables kết hợp AWS Global Accelerator cho traffic routing để tối ưu latency toàn cầu!
Which solution will meet these requirements?
- A Use the internet gateway of the VPC to access the DynamoDB table. Use the ALB to route the traffic to the EC2 instances.
- B Add a NAT gateway in one of the public subnets of the VPC. Configure the security groups of the EC2 instances to access the DynamoDB table through the NAT gateway.
- C Use the Site-to-Site VPN connection to route all DynamoDB network traffic through the on-premises network infrastructure to access the EC2 instances.
- D Create a VPC endpoint for DynamoDB. Assign the endpoint to the route table of the private subnets that contain the EC2 instances.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một môi trường hybrid nơi VPC kết nối với mạng on-premises qua AWS Site-to-Site VPN. Trong VPC, ứng dụng chạy trên Amazon EC2 instances nằm ở private subnets, phía sau Application Load Balancer (ALB) được gắn với public subnets. Yêu cầu chính là EC2 instances cần truy cập an toàn (securely) vào một Amazon DynamoDB table.
🔍 Chi tiết vấn đề:
- EC2 ở private subnets không có đường ra internet trực tiếp, nên cần giải pháp để truy cập DynamoDB mà không lộ ra public internet, đảm bảo bảo mật cao (không dùng public IP, giữ traffic nội bộ AWS).
- ALB chỉ dùng để expose ứng dụng ra ngoài (cho client truy cập EC2), không liên quan trực tiếp đến traffic từ EC2 ra DynamoDB.
- Mục tiêu: Tối ưu bảo mật, hiệu suất, chi phí thấp, phù hợp với best practices AWS cho private resources truy cập AWS services như DynamoDB.
📘 Kiến thức cập nhật (đến 2026): Theo AWS Well-Architected Framework (DevOps Pillar) và DOP-C02 exam guide, giải pháp chuẩn là VPC Gateway Endpoint cho DynamoDB (hỗ trợ từ 2016, vẫn là recommended đến nay, không thay đổi lớn).
✅ Đáp án đúng: Create a VPC endpoint for DynamoDB. Assign the endpoint to the route table of the route table of the private subnets that contain the EC2 instances.
Lý do chọn đáp án này:
- VPC Endpoint (Gateway type) cho DynamoDB cho phép traffic từ private subnets đến DynamoDB giữ hoàn toàn trong AWS backbone network, không qua internet, NAT hay VPN → bảo mật tối đa (zero egress cost, private DNS hỗ trợ).
- Cách triển khai: Tạo endpoint trong VPC, gắn policy IAM để chỉ cho phép truy cập table cụ thể, thêm route prefix
pl-123456vào route table của private subnets → traffic tự động route qua endpoint. - Ưu điểm: Free (chỉ trả data processing), scalable, tuân thủ zero-trust model. Không ảnh hưởng ALB hay VPN (VPN chỉ cho hybrid data).
- Nguồn tham khảo:
- AWS Docs: VPC endpoints for DynamoDB (cập nhật 2024).
- AWS VPC Endpoints Best Practices (khuyến nghị 2025).
🛠️ Giải thích chi tiết từng phương án
-
Use the internet gateway of the VPC to access the DynamoDB table. Use the ALB to route the traffic to the EC2 instances.
❌ Sai: Internet Gateway (IGW) chỉ dùng cho public subnets (0.0.0.0/0 → igw-xxxx), private subnets không route trực tiếp ra IGW mà cần NAT. ALB chỉ route vào EC2 (ingress), không route ra DynamoDB từ EC2. Giải pháp này lộ traffic ra public internet → không an toàn. -
Add a NAT gateway in one of the public subnets of the VPC. Configure the security groups of the EC2 instances to access the DynamoDB table through the NAT gateway.
❌ Sai: NAT Gateway cho phép private subnets ra internet (0.0.0.0/0 → nat-xxxx), có thể truy cập DynamoDB qua public endpoint. Tuy nhiên, traffic vẫn qua public internet (dùng public IP của NAT), không phải "securely" nhất (có rủi ro DDoS, chi phí cao NAT hourly/data). Security Groups chỉ kiểm soát port, không giải quyết bảo mật đường truyền. -
Use the Site-to-Site VPN connection to route all DynamoDB network traffic through the on-premises network infrastructure to access the EC2 instances.
❌ Sai: VPN dùng cho hybrid connectivity (VPC ↔ on-premises), không route traffic đến AWS services như DynamoDB (DynamoDB endpoint là trong AWS global network). Hơn nữa, mô tả "route DynamoDB traffic qua on-prem để access EC2" sai hướng (EC2 cần access DynamoDB, không phải ngược lại). Thêm độ trễ cao, phức tạp, không an toàn/bảo mật cho AWS service. -
Create a VPC endpoint for DynamoDB. Assign the endpoint to the route table of the private subnets that contain the EC2 instances.
✅ Đúng: Như giải thích trên, đây là giải pháp chuẩn, an toàn nhất cho private EC2 access DynamoDB mà không rời khỏi AWS network. Route table private subnets sẽ có entryvpce-xxx→com.amazonaws.region.dynamodb, hỗ trợ endpoint policy để fine-grained access.
💡 Lời khuyên DevOps: Test bằng AWS Console/CLI: aws ec2 create-vpc-endpoint --vpc-id vpc-xxx --service-name com.amazonaws.region.dynamodb. Monitor bằng CloudWatch VPC Flow Logs. Nếu cần multi-region, dùng Global Accelerator hoặc Interface Endpoints cho services khác! 🚀
Which combination of steps should the database specialist take to meet this requirement? (Choose two.)
- A Set the audit_logs cluster parameter to enabled.
- B Enable DocumentDB log export to Amazon CloudWatch Logs.
- C Enable Enhanced Monitoring for DocumentDB.
- D Enable AWS CloudTrail for DocumentDB.
- E Use AWS Config to monitor the state of DocumentDB.
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 Amazon DocumentDB (với tính tương thích MongoDB), một dịch vụ cơ sở dữ liệu được quản lý bởi AWS, dùng làm backend cho ứng dụng web. Ứng dụng đã có access control đầy đủ (như IAM, VPC security, encryption), nhưng database specialist cần review logs (xem nhật ký) trong trường hợp primary DocumentDB database bị xóa (deleted).
Mục tiêu: Đảm bảo có thể truy vết sự kiện xóa cluster chính (primary instance) qua logs, ngay cả khi cluster không còn tồn tại. Điều này yêu cầu kết hợp TWO steps để enable auditing và lưu trữ logs bền vững.
🛠️ Yêu cầu cốt lõi: Logs phải ghi lại hành động xóa (delete cluster), bao gồm ai thực hiện, thời gian, và chi tiết. DocumentDB hỗ trợ audit logs (nghị sự kiện truy cập dữ liệu và admin actions như delete) và log exports để lưu trữ ngoài cluster (tránh mất dữ liệu khi delete).
📈 Kiến thức cập nhật AWS 2024-2026: DocumentDB (phiên bản 5.0+) hỗ trợ advanced auditing qua cluster parameter audit_logs, và export logs đến CloudWatch Logs/S3 (tính năng ổn định từ 2022, mở rộng 2024 với performance insights).
✅ Đáp án đúng (Chọn TWO)
Các bước đúng là:
Set the audit_logs cluster parameter to enabled.
Enable DocumentDB log exports to Amazon CloudWatch Logs.
Lý do lựa chọn:
- audit_logs parameter: Bật tính năng ghi nhật ký audit toàn diện, bao gồm admin actions như DELETE cluster/instance. Logs này lưu trong cluster nhưng cần export để bền vững.
- Log export to CloudWatch Logs: Xuất audit logs ra CloudWatch, lưu trữ indefinitely (không mất khi cluster delete). Có thể query/search logs qua CloudWatch Logs Insights để review sự kiện xóa.
🧩 Kết hợp hai bước: audit_logs tạo logs → export giữ logs mãi mãi → review dễ dàng post-deletion.
📋 Giải thích tất cả các phương án (Đúng/Sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết:
✅ Set the audit_logs cluster parameter to enabled.
Phương án này ĐÚNG. Parameter audit_logs trong DocumentDB cluster parameter group bật auditing chi tiết, ghi lại tất cả admin connections và actions (như DELETE cluster). Logs bao gồm user, IP, timestamp, command (e.g., "db.dropDatabase()" hoặc AWS API delete). Không bật → không có audit trail. Áp dụng ngay bằng modify cluster parameter group (reboot required).
✅ Enable DocumentDB log export to Amazon CloudWatch Logs.
Phương án này ĐÚNG. DocumentDB hỗ trợ export audit, error, general, slow query logs đến CloudWatch Logs qua console/CLI/API (modify-cluster → logExports). Logs lưu trong log group /aws/docdb/cluster-name/audit, tồn tại độc lập với cluster → review được sau delete. Hỗ trợ retention policies và Insights queries.
❌ Enable Enhanced Monitoring for DocumentDB.
Phương án này SAI. Enhanced Monitoring chỉ cung cấp OS-level metrics/logs (CPU, memory, disk via CloudWatch Agent) mỗi 1 giây, không ghi audit actions như delete cluster. Nó tập trung performance monitoring (e.g., processes, network), không thay thế audit logs. Enable qua modify-db-cluster → monitoringRole.
❌ Enable AWS CloudTrail for DocumentDB.
Phương án này SAI. CloudTrail ghi AWS API calls (e.g., DeleteDBCluster API), hữu ích track "ai gọi delete từ console/CLI". Nhưng không phải database logs nội bộ (không chi tiết như audit_logs về MongoDB commands). CloudTrail data events chỉ cho S3/DynamoDB, không native cho DocumentDB delete actions đầy đủ.
❌ Use AWS Config to monitor the state of DocumentDB.
Phương án này SAI. AWS Config ghi configuration changes (e.g., cluster state từ "available" → "deleted"), nhưng không lưu logs chi tiết về ai/xử lý delete. Nó chỉ snapshot resource config, không audit trail events. Dùng cho compliance, không review logs post-deletion.
📘 Tài liệu tham khảo (AWS Official Docs - Cập nhật 2024-2026)
- DocumentDB Auditing: Amazon DocumentDB Auditing Documentation – Chi tiết
audit_logsparameter. - Log Exports: Exporting Logs to CloudWatch – Hướng dẫn enable exports.
- Enhanced Monitoring: Enhanced Monitoring Docs.
- CloudTrail for DocumentDB: CloudTrail Integration.
- AWS Exam Prep: DOP-C02 Sample Questions (tương tự câu này).
Hy vọng phân tích giúp bạn ôn thi hiệu quả! 🚀 Nếu cần thêm ví dụ CLI/Console, hỏi nhé!