Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
Cloud. The IT Risk and Compliance department requires that auditing be enabled on all secure databases to capture all log ins, log outs, failed logins, permission changes, and database schema changes. A Database Specialist has recommended Amazon Aurora MySQL as the migration target, and leveraging the Advanced
Auditing feature in Aurora.
Which events need to be specified in the Advanced Auditing configuration to satisfy the minimum auditing requirements? (Choose three.)
- A CONNECT
- B QUERY_DCL
- C QUERY_DDL
- D QUERY_DML
- E TABLE
- F QUERY
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào việc cấu hình Advanced Auditing trên Amazon Aurora MySQL (phiên bản mới nhất đến năm 2026 vẫn hỗ trợ đầy đủ tính năng này theo AWS RDS documentation). Công ty đang di chuyển ứng dụng và cơ sở dữ liệu bảo mật từ on-premises sang AWS Cloud. Bộ phận IT Risk và Compliance yêu cầu kích hoạt auditing trên tất cả các cơ sở dữ liệu bảo mật để ghi lại tất cả các sự kiện đăng nhập (log ins), đăng xuất (log outs), đăng nhập thất bại (failed logins), thay đổi quyền hạn (permission changes), và thay đổi schema cơ sở dữ liệu (database schema changes).
Chuyên gia Database Specialist đề xuất sử dụng Amazon Aurora MySQL làm mục tiêu di chuyển và kích hoạt Advanced Auditing.
Nhiệm vụ: Chọn 3 events cần chỉ định trong cấu hình Advanced Auditing để đáp ứng tối thiểu yêu cầu auditing (minimum auditing requirements).
📘 Lưu ý quan trọng: Advanced Auditing trong Aurora MySQL cho phép ghi log chi tiết các sự kiện cụ thể qua tham số server_audit_events, giúp tuân thủ các tiêu chuẩn như GDPR, HIPAA mà không làm ảnh hưởng lớn đến hiệu suất.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng (chọn 3): CONNECT, QUERY_DCL, QUERY_DDL.
🛠️ Lý do chi tiết:
- CONNECT: Ghi lại tất cả kết nối, ngắt kết nối (log ins, log outs) và đăng nhập thất bại – trực tiếp đáp ứng yêu cầu về login/logout/failed logins.
- QUERY_DCL: Ghi lại các câu lệnh Data Control Language (GRANT, REVOKE, SET PASSWORD) – bao quát thay đổi quyền hạn (permission changes).
- QUERY_DDL: Ghi lại các câu lệnh Data Definition Language (CREATE, ALTER, DROP TABLE/INDEX/VIEW, v.v.) – bao quát thay đổi schema cơ sở dữ liệu.
Bộ ba này là tối thiểu cần thiết, vì chúng chính xác khớp với các yêu cầu cụ thể mà không ghi thừa dữ liệu (như DML hoặc query thông thường), giúp tối ưu hiệu suất và chi phí lưu trữ log trên CloudWatch Logs hoặc S3. Theo best practices AWS (cập nhật 2026), cấu hình này đảm bảo compliance mà không cần bật tất cả events.
📋 Giải thích tất cả các phương án (đúng và sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, dựa trên tài liệu AWS RDS Aurora MySQL Advanced Auditing (phiên bản mới nhất):
-
✅ CONNECT
Đúng: Event này ghi log tất cả kết nối thành công/thất bại, ngắt kết nối, và xác thực người dùng. Hoàn hảo cho yêu cầu log ins, log outs, failed logins. Không có event nào khác thay thế được. -
✅ QUERY_DCL
Đúng: Ghi lại các lệnh DCL như GRANT, REVOKE, CREATE/ALTER USER – chính xác khớp với permission changes. Bắt buộc để audit quyền hạn. -
✅ QUERY_DDL
Đúng: Ghi lại DDL như CREATE/ALTER/DROP TABLE, INDEX, VIEW – trực tiếp đáp ứng database schema changes. Là event cốt lõi cho structural changes. -
❌ QUERY_DML
Sai: Event này chỉ ghi INSERT, UPDATE, DELETE, REPLACE (thao tác dữ liệu). Không liên quan đến login, permission, hay schema changes – thừa thãi và làm tăng log volume không cần thiết. -
❌ TABLE
Sai: Event này lấy mẫu dữ liệu từ các bảng (table sampling) để audit nội dung dữ liệu. Không ghi login/permission/schema, mà chỉ dùng cho data leakage detection – không khớp yêu cầu minimum. -
❌ QUERY
Sai: Ghi tất cả các query (bao gồm SELECT, DML, DDL, DCL). Quá rộng, ghi thừa dữ liệu thông thường, làm tăng chi phí và giảm hiệu suất – không phải minimum requirements.
📚 Tài liệu tham khảo
- AWS Documentation chính thức (cập nhật đến 2026): Amazon Aurora MySQL Advanced Auditing – Chi tiết các event types và ví dụ cấu hình
server_audit_events. - AWS Best Practices: RDS Auditing Best Practices – Khuyến nghị sử dụng CONNECT + QUERY_DCL + QUERY_DDL cho compliance cơ bản.
- Exam Topic DOP-C02: Phần Database Migration & Security Auditing trong AWS Certified DevOps Engineer - Professional.
Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần thêm ví dụ cấu hình CloudFormation hoặc Terraform, hãy hỏi nhé!
Which solution will meet these requirements at the lowest cost?
- A DynamoDB Streams
- B DynamoDB with DynamoDB Accelerator
- C DynamoDB with on-demand capacity mode
- D DynamoDB with provisioned capacity mode with Auto Scaling
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS
📖 Nội dung câu hỏi được giải thích rõ ràng:
Câu hỏi mô tả một công ty game mới mua lại một tựa game iOS rất phổ biến vào mùa lễ hội (holiday season). Họ quyết định tích hợp leaderboard (bảng xếp hạng) sử dụng Amazon DynamoDB. Đặc biệt, tải ứng dụng (application load) dự kiến sẽ tăng dần (ramp up) cao điểm vào mùa lễ hội. Yêu cầu là chọn giải pháp đáp ứng nhu cầu (meet these requirements) với chi phí thấp nhất (lowest cost).
🛠️ Bối cảnh kỹ thuật chính:
- Leaderboard thường yêu cầu throughput cao (RCU/WCU lớn) để xử lý đọc/ghi điểm số từ hàng triệu người chơi, đặc biệt bursty vào mùa lễ hội.
- Traffic dự đoán được (predictable pattern: tăng dần và cao điểm theo mùa).
- Mục tiêu: Scale tự động, hiệu suất tốt, nhưng tối ưu chi phí so với on-demand (pay-per-request đắt đỏ cho high-volume).
Dựa trên kiến thức AWS mới nhất (2024-2026), DynamoDB hỗ trợ 2 chế độ capacity: Provisioned (cố định + Auto Scaling) và On-Demand (tự động theo request), với Provisioned rẻ hơn cho workload predictable/bursty theo mùa.
✅ Đáp án đúng: DynamoDB with provisioned capacity mode with Auto Scaling
Lý do lựa chọn (chi tiết):
Giải pháp này cho phép cấu hình dung lượng cố định tối thiểu (min provisioned capacity), kết hợp Auto Scaling tự động điều chỉnh RCU/WCU dựa trên utilization target (ví dụ: 70%). Với traffic tăng dần theo mùa lễ hội (predictable ramp-up), Auto Scaling scale up/down nhanh chóng (phút), tránh over-provisioning. Chi phí thấp nhất vì:
- Trả phí theo giờ cho capacity đã provision (rẻ hơn 20-40% so với on-demand cho high-throughput predictable).
- Reserved Capacity (1-3 năm) có thể giảm thêm 40-60%.
Phù hợp leaderboard game: Scale từ low (off-season) lên high (holiday), tối ưu chi phí dài hạn. AWS khuyến nghị cho workload có pattern theo mùa.
🛡️ Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn giữ nguyên văn bản gốc tiếng Anh, với giải thích sai/đúng bằng tiếng Việt. Tôi đánh dấu ✅ đúng, ❌ sai, kèm lý do dựa trên best practices AWS.
-
❌ DynamoDB Streams
Sai vì: DynamoDB Streams chỉ dùng để capture item-level changes (thay đổi dữ liệu theo thời gian thực), tích hợp với Lambda/Kinesis cho replication/backup. Không giải quyết scaling capacity hay throughput cho leaderboard. Sử dụng sẽ tăng chi phí không cần thiết (pay per stream read), không meet requirement ramp-up load. -
❌ DynamoDB with DynamoDB Accelerator
Sai vì: DAX (DynamoDB Accelerator) là in-memory cache tăng tốc độ đọc (sub-millisecond), giảm tải DynamoDB chính. Tuy nhiên, không scale capacity chính, chỉ cache (chi phí riêng ~$0.04/GB-hour + throughput). Với leaderboard write-heavy (cập nhật điểm số), DAX ít hiệu quả và tăng tổng chi phí (không lowest cost), phù hợp read-heavy hơn. -
❌ DynamoDB with on-demand capacity mode
Sai vì: On-Demand tự động scale theo request (không cần provision), lý tưởng unpredictable traffic. Nhưng với high-volume ramp-up theo mùa (gaming leaderboard), chi phí cao hơn provisioned 20-100% (pay $1.25/million writes, scale nhanh nhưng đắt cho sustained high load). AWS docs xác nhận: On-Demand đắt hơn cho predictable workloads. -
✅ DynamoDB with provisioned capacity mode with Auto Scaling
Đúng vì: Provisioned mode set RCU/WCU min/max, Auto Scaling (dùng Application Auto Scaling) điều chỉnh tự động dựa metric CloudWatch (utilization). Với holiday ramp-up dự đoán, scale tiết kiệm (pay per hour provisioned). Lowest cost nhờ: Auto Scaling + Reserved Capacity. Hỗ trợ burst lên 2x provisioned tự do.
📘 Tài liệu tham khảo AWS (cập nhật mới nhất 2024-2026)
- DynamoDB Capacity Modes: So sánh Provisioned vs On-Demand, khuyến nghị Auto Scaling cho seasonal workloads.
- Auto Scaling for DynamoDB: Hướng dẫn setup, ví dụ gaming use cases.
- DynamoDB Pricing & Reserved Capacity: Calculator chứng minh provisioned rẻ hơn.
- AWS Well-Architected Framework (Pillar: Cost Optimization) - Gaming Lens: Khuyến nghị provisioned + Auto Scaling cho leaderboards.
🛠️ Lời khuyên DevOps: Test với DynamoDB Capacity Calculator, monitor CloudWatch cho utilization >70% trước holiday. Sử dụng Global Tables nếu multi-region!
Which combination of actions should the Database Specialist take? (Choose three.)
- A Disable Transparent Data Encryption (TDE) on the RDS SQL Server DB instance.
- B Modify the RDS SQL Server DB instance to use the directory for Windows authentication. Create appropriate new logins.
- C Use the AWS Management Console to create an AWS Managed Microsoft AD. Create a trust relationship with the corporate AD.
- D Stop the RDS SQL Server DB instance, modify it to use the directory for Windows authentication, and start it again. Create appropriate new logins.
- E Use the AWS Management Console to create an AD Connector. Create a trust relationship with the corporate AD.
- F Configure the AWS Managed Microsoft AD domain controller Security Group.
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ích hợp xác thực Windows Authentication (Windows Auth) cho một instance Amazon RDS for SQL Server hiện có, sử dụng tài khoản Active Directory (AD) từ hệ thống AD nội bộ (corporate AD) của công ty. ✅
- Bối cảnh: Bộ phận Bảo mật yêu cầu người dùng nội bộ kết nối RDS SQL Server mà không cần tạo tài khoản DB riêng, thay vào đó dùng credentials AD công ty. Điều này đòi hỏi thiết lập Kerberos authentication qua AWS Directory Service.
- Yêu cầu chính: Database Specialist phải chọn kết hợp 3 hành động để đáp ứng, bao gồm tạo directory service tương thích, thiết lập trust relationship, cấu hình RDS instance và bảo mật network.
- Kiến thức cốt lõi (cập nhật AWS 2026): RDS SQL Server hỗ trợ Windows Auth từ năm 2016, yêu cầu AWS Managed Microsoft AD (không phải AD Connector), trust với on-prem AD, modify RDS option group (không cần stop instance), tạo login AD users/groups, và SG cho phép RDS truy cập AD DCs trên port 88 (Kerberos), 445 (SMB), v.v. 🛠️
✅ Đáp án đúng (Chọn 3):
Dưới đây là 3 lựa chọn chính xác, dựa trên quy trình chuẩn AWS:
-
Use the AWS Management Console to create an AWS Managed Microsoft AD. Create a trust relationship with the corporate AD.
- Lý do: AWS Managed Microsoft AD là dịch vụ bắt buộc để RDS SQL Server hỗ trợ Windows Auth với on-prem AD. Trust relationship cho phép AD corporate ủy quyền Kerberos tickets cho RDS. Không dùng AD Connector vì nó chỉ proxy LDAP, không hỗ trợ Kerberos đầy đủ.
-
Modify the RDS SQL Server DB instance to use the directory for Windows authentication. Create appropriate new logins.
- Lý do: Sử dụng Modify option trong Console/CLI để attach directory ID vào RDS SQL Server (qua Option Group "SQLSERVER_BACKUP_EXTENDED_RETENTION_PERIOD" hoặc custom cho Windows Auth). Sau đó, tạo login kiểu
CREATE LOGIN [domain\user] FROM WINDOWS;. Thao tác này online, không downtime.
- Lý do: Sử dụng Modify option trong Console/CLI để attach directory ID vào RDS SQL Server (qua Option Group "SQLSERVER_BACKUP_EXTENDED_RETENTION_PERIOD" hoặc custom cho Windows Auth). Sau đó, tạo login kiểu
-
Configure the AWS Managed Microsoft AD domain controller Security Group.
- Lý do: SG của AD DCs phải inbound từ RDS SG trên các port cần thiết (TCP/UDP 88 Kerberos, 389 LDAP, 445 SMB/LDAP, 464 kpasswd, 3268 GC). Điều này đảm bảo RDS có thể lấy Kerberos SPN cho authentication.
📋 Giải thích TẤT CẢ các phương án (Đúng/Sai)
Dưới đây là phân tích toàn bộ 6 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 - chọn) hoặc ❌ (Sai - không chọn), kèm giải thích chi tiết bằng tiếng Việt dựa trên docs AWS mới nhất.
-
Disable Transparent Data Encryption (TDE) on the RDS SQL Server DB instance.
❌ Sai: TDE mã hóa dữ liệu tại rest, không liên quan đến authentication. Vô hiệu hóa TDE không giúp Windows Auth mà còn giảm bảo mật. Không cần thiết theo yêu cầu. -
Modify the RDS SQL Server DB instance to use the directory for Windows authentication. Create appropriate new logins.
✅ Đúng: Đây là bước cốt lõi sau khi có directory. Modify instance để enable Windows Auth (qua AWS Console > Modify > Database options > Directory), rồi tạo login DB cho AD users/groups (e.g.,CREATE LOGIN [CORP\group] FROM WINDOWS;). Hỗ trợ online modify từ RDS SQL Server 2016+. -
Use the AWS Management Console to create an AWS Managed Microsoft AD. Create a trust relationship with the corporate AD.
✅ Đúng: AWS Managed Microsoft AD (trong Directory Service) là nền tảng cho RDS Windows Auth. Tạo trust one-way từ Managed AD sang corporate AD qua Console/CLI, sử dụng DNS forwarders và shared key để Kerberos trust hoạt động. -
Stop the RDS SQL Server DB instance, modify it to use the directory for Windows authentication, and start it again. Create appropriate new logins.
❌ Sai: Không cần stop instance! RDS SQL Server hỗ trợ modify Windows Auth option online (không downtime) từ phiên bản 13.00 trở lên. Stop chỉ cần cho một số thay đổi khác như multi-AZ. -
Use the AWS Management Console to create an AD Connector. Create a trust relationship with the corporate AD.
❌ Sai: AD Connector chỉ proxy read-only đến on-prem AD (cho IAM Identity Center/SAML), không hỗ trợ Kerberos/Windows Auth đầy đủ cho RDS SQL Server. Phải dùng AWS Managed Microsoft AD để có domain controllers thực thụ. -
Configure the AWS Managed Microsoft AD domain controller Security Group.
✅ Đúng: Bắt buộc cấu hình SG cho AD DCs cho phép traffic từ RDS endpoint (VPC peering/subnet). Ports: 53 (DNS), 88 (Kerberos), 135 (RPC), 389/636 (LDAP), 445 (SMB), 464 (kpasswd). Nếu không, auth sẽ fail.
📘 Tài liệu tham khảo (AWS Docs cập nhật 2026)
- Hướng dẫn chính: Amazon RDS for SQL Server Windows Authentication – Chi tiết quy trình full.
- AWS Managed Microsoft AD: Set up AWS Managed Microsoft AD & Trust relationships.
- Security Groups: Directory Service ports.
- RDS SQL Server best practices: AWS re:Post & Well-Architected Framework (Reliability pillar).
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần thêm ví dụ CLI hoặc lab, hãy hỏi nhé.
ERROR: cloud not write block 7507718 of temporary file: No space left on device
What is the cause of this error and what should the Database Specialist do to resolve this issue?
- A The scaling of Aurora storage cannot catch up with the data loading. The Database Specialist needs to modify the workload to load the data slowly.
- B The scaling of Aurora storage cannot catch up with the data loading. The Database Specialist needs to enable Aurora storage scaling.
- C The local storage used to store temporary tables is full. The Database Specialist needs to scale up the instance.
- D The local storage used to store temporary tables is full. The Database Specialist needs to enable local storage scaling.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi AWS về Amazon Aurora
Câu hỏi gốc (bằng tiếng Anh để giữ tính chính xác):
A Database Specialist is performing a proof of concept with Amazon Aurora using a small instance to confirm a simple database behavior. When loading a large dataset and creating the index, the Database Specialist encounters the following error message from Aurora:
ERROR: cloud not write block 7507718 of temporary file: No space left on device
What is the cause of this error and what should the Database Specialist do to resolve this issue?
✅ Giải thích nội dung câu hỏi một cách chi tiết:
Câu hỏi mô tả tình huống một Database Specialist đang thử nghiệm proof of concept (POC) trên Amazon Aurora với một instance nhỏ (small instance). Khi load một dataset lớn và tạo index, hệ thống báo lỗi: "ERROR: cloud not write block 7507718 of temporary file: No space left on device" (lưu ý lỗi chính tả nhỏ trong câu hỏi gốc: "cloud" thay vì "could").
🛠️ Nguyên nhân cốt lõi: Lỗi này xảy ra vì local storage (bộ nhớ cục bộ) của instance Aurora bị đầy. Trong các hoạt động như load dữ liệu lớn, tạo index (index creation), PostgreSQL/MySQL engine của Aurora sử dụng temporary files (tệp tạm thời) cho các thao tác sorting, hashing, temp tables hoặc parallel query. Những tệp này được lưu trên local NVMe SSD storage của instance (gọi là EBS-provisioned IOPS storage hoặc instance store), không phải storage chia sẻ của Aurora cluster. Storage cluster của Aurora tự động scale (lên đến 128 TiB hoặc hơn tùy engine), nhưng local storage của instance là cố định, phụ thuộc vào instance class (ví dụ: db.t3.small chỉ có 1 GB local storage). Với workload lớn trên instance nhỏ, local storage nhanh chóng hết chỗ, dẫn đến lỗi "No space left on device".
📈 Bối cảnh AWS cập nhật 2026: Theo tài liệu AWS mới nhất (Aurora User Guide 2026), local storage không tự động scale; phải scale up instance class để tăng dung lượng (ví dụ: từ db.t4g.medium lên db.r6g.large có local storage lớn hơn đáng kể).
✅ Đáp án đúng và lý do lựa chọn:
Đáp án đúng là: The local storage used to store temporary tables is full. The Database Specialist needs to scale up the instance.
Lý do chi tiết:
- Lỗi trực tiếp chỉ ra temporary file hết không gian trên local storage của instance.
- Giải pháp: Scale up instance (tăng kích thước instance class, ví dụ: db.t3.small → db.r6g.xlarge) để có thêm local storage (có thể lên đến hàng TB tùy class). Điều này nhanh chóng và hiệu quả cho POC, tránh downtime lớn. Aurora hỗ trợ scale instance trong vài phút với Multi-AZ.
- Không liên quan đến storage cluster vì lỗi là về "temporary file" cục bộ, không phải data persistence.
📋 Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá với lý do rõ ràng dựa trên kiến thức AWS Aurora (PostgreSQL/MySQL compatible).
❌ Phương án SAI: The scaling of Aurora storage cannot catch up with the data loading. The Database Specialist needs to modify the workload to load the data slowly.
Giải thích sai: Storage của Aurora cluster tự động scale theo nhu cầu (auto-scaling lên 10 GB/phút, tối đa 128 TiB+), không cần load chậm. Lỗi không phải do storage cluster chậm mà là local storage instance đầy (temporary files). Load chậm chỉ làm chậm POC, không giải quyết gốc rễ.
❌ Phương án SAI: The scaling of Aurora storage cannot catch up with the data loading. The Database Specialist needs to enable Aurora storage scaling.
Giải thích sai: Aurora storage đã tự động bật scaling mặc định từ khi tạo cluster (không cần "enable"). Lỗi temporary file không liên quan storage cluster (dùng cho data chính), mà là local instance storage. "Enable" không tồn tại vì nó luôn on.
✅ Phương án ĐÚNG: The local storage used to store temporary tables is full. The Database Specialist needs to scale up the instance.
Giải thích đúng (tóm tắt lại): Như đã nêu ở trên, khớp chính xác với cơ chế Aurora: temp tables/files dùng local storage cố định → scale up instance để tăng dung lượng (xem bảng instance specs trên AWS console).
❌ Phương án SAI: The local storage used to store temporary tables is full. The Database Specialist needs to enable local storage scaling.
Giải thích sai: Nguyên nhân đúng (local storage đầy), nhưng giải pháp sai. Local storage của Aurora instance KHÔNG hỗ trợ auto-scaling (fixed theo instance class, không có tùy chọn "enable scaling"). Phải scale up thủ công hoặc dùng instance class lớn hơn từ đầu.
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- Aurora User Guide: Amazon Aurora storage and I/O – Giải thích local instance store cho temp operations.
- RDS Instance Specs: Hardware specifications – Bảng local storage per class (ví dụ: db.t4g.micro: ~0.9 GB).
- Troubleshooting Guide: Resolve "No space left on device" – Xác nhận scale up cho temp files.
- Exam DOP-C02: Topic "Aurora operations and scaling" (AWS Certified DevOps Engineer Professional).
🛠️ Khuyến nghị thực tế: Trong POC, dùng AWS Console/CLI scale instance ngay:aws rds modify-db-instance --db-instance-identifier myaurora --db-instance-class db.r6g.large. Test lại vớiwork_memparameter nếu cần tối ưu.
Which solution addresses these requirements?
- A Set the rds.force_ssl=0 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=allow.
- B Set the rds.force_ssl=1 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=disable.
- C Set the rds.force_ssl=0 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=verify-ca.
- D Set the rds.force_ssl=1 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=verify-full.
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 bảo mật kết nối đến Amazon Aurora PostgreSQL DB cluster cho một công ty tài chính lưu trữ dữ liệu người dùng nhạy cảm. Các ứng dụng từ nhiều nơi sẽ truy cập DB này. Yêu cầu cụ thể:
- ✅ Tất cả giao tiếp phải được mã hóa (encrypted communications).
- ✅ Xác thực danh tính server (server identity must be validated) – nghĩa là client phải kiểm tra chứng chỉ của server một cách nghiêm ngặt.
- ✅ Cấm hoàn toàn kết nối không dùng SSL (disallow non-SSL-based connections).
Mục tiêu: Tìm giải pháp cấu hình DB parameter group và PostgreSQL connection string để đáp ứng đầy đủ các yêu cầu trên, sử dụng Amazon RDS certificate bundle (gói chứng chỉ RDS tải về từ AWS).
🛠️ Kiến thức cốt lõi (cập nhật AWS 2026): Aurora PostgreSQL hỗ trợ SSL/TLS qua parameter rds.force_ssl (0=không bắt buộc, 1=bắt buộc từ chối non-SSL). Client PostgreSQL dùng sslmode để kiểm soát mức độ xác thực SSL (từ disable đến verify-full). Phải tải certificate bundle từ AWS (rds-ca-2019-root.pem hoặc bundle mới nhất) để verify CA và hostname.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Set the rds.force_ssl=1 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=verify-full.
Lý do:
rds.force_ssl=1: 🛡️ Bắt buộc tất cả kết nối phải dùng SSL/TLS, từ chối ngay lập tức mọi kết nối non-SSL → Đáp ứng "disallow non-SSL".- Tải và dùng RDS certificate bundle: Cung cấp root CA để client verify chứng chỉ server.
sslmode=verify-full: 🔒 Bắt buộc SSL + verify CA (kiểm tra chuỗi chứng chỉ hợp lệ) + verify hostname (khớp tên server chính xác) → Đáp ứng "encrypted" và "validate server identity" một cách nghiêm ngặt nhất.- Toàn diện: Kết hợp server-side force + client-side strict verification, phù hợp multi-app access với dữ liệu nhạy cảm.
📋 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 giữ nguyên văn bản gốc tiếng Anh, với giải thích hoàn toàn bằng tiếng Việt:
-
❌ Phương án SAI: Set the rds.force_ssl=0 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=allow.
Lý do sai:rds.force_ssl=0không bắt buộc SSL → Cho phép non-SSL connections (vi phạm "disallow non-SSL").sslmode=allowchỉ thử SSL nhưng fallback sang non-SSL nếu thất bại → Không mã hóa tất cả và không validate server nghiêm ngặt. -
❌ Phương án SAI: Set the rds.force_ssl=1 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=disable.
Lý do sai:rds.force_ssl=1đúng (force SSL), nhưngsslmode=disabletắt hoàn toàn SSL ở client → Kết nối sẽ bị từ chối bởi server (mâu thuẫn), không mã hóa gì cả, vi phạm toàn bộ yêu cầu. -
❌ Phương án SAI: Set the rds.force_ssl=0 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=verify-ca.
Lý do sai:rds.force_ssl=0không cấm non-SSL → Vẫn cho phép kết nối không mã hóa.sslmode=verify-caverify CA tốt nhưng thiếu verify hostname đầy đủ và không force SSL → Không validate server identity hoàn chỉnh, không "disallow non-SSL". -
✅ Phương án ĐÚNG: Set the rds.force_ssl=1 parameter in DB parameter groups. Download and use the Amazon RDS certificate bundle and configure the PostgreSQL connection string with sslmode=verify-full.
Lý do đúng: Như đã giải thích ở trên – Hoàn hảo khớp mọi yêu cầu: force SSL server-side + verify-full client-side (mã hóa + validate CA + hostname).
📘 Tài liệu tham khảo (AWS cập nhật mới nhất 2026)
- AWS RDS SSL/TLS Docs: Using SSL/TLS to encrypt a connection to a DB instance – Chi tiết
rds.force_sslvà certificate bundle. - Aurora PostgreSQL SSL: Amazon Aurora PostgreSQL SSL Connections – Xác nhận
sslmode=verify-fullcho strict validation. - PostgreSQL SSL Docs: libpq SSL Support – Giải thích các mức
sslmode. - Certificate Bundle: Tải tại RDS SSL Certificates (bundle mới nhất: rds-ca-rsa2048-g1 hoặc tương đương 2026).
🛡️ Lời khuyên DevOps: Luôn test kết nối với psql sau cấu hình, và rotate cert định kỳ qua AWS console để tuân thủ compliance tài chính!
Administrator must provide Auditors with data within 24 hours.
Which solution will meet these requirements and is the MOST operationally efficient?
- A Create an AWS Lambda function to run on the first day of every month to take a manual RDS snapshot. Move the snapshot to the company's Amazon S3 bucket.
- B Create an AWS Lambda function to run on the first day of every month to take a manual RDS snapshot.
- C Create an RDS snapshot schedule from the AWS Management Console to take a snapshot every 30 days.
- D Create an AWS Lambda function to run on the first day of every month to create an automated RDS snapshot.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi
📘 Nội dung câu hỏi:
Câu hỏi xoay quanh một công ty sử dụng các instance Amazon RDS dung lượng 5 TB, cần duy trì backup hàng tháng trong 5 năm (tức khoảng 60 backup) để tuân thủ quy định pháp lý (compliance). Quản trị viên cơ sở dữ liệu (Database Administrator) phải cung cấp dữ liệu cho các kiểm toán viên (Auditors) trong vòng 24 giờ. Giải pháp cần đáp ứng yêu cầu này và là hiệu quả vận hành nhất (MOST operationally efficient).
🔑 Yêu cầu chính:
- Backup phải giữ lâu dài (5 năm), không bị xóa tự động.
- Có thể khôi phục nhanh để cung cấp dữ liệu trong 24 giờ (RDS snapshot có thể restore thành instance mới, thời gian khôi phục phụ thuộc kích thước nhưng khả thi cho 5 TB).
- Hiệu quả vận hành cao: Ít can thiệp thủ công, tự động hóa, chi phí thấp, dễ quản lý.
🛠️ Kiến thức AWS liên quan (cập nhật đến 2026):
- Automated backups (backup tự động RDS): Chỉ giữ tối đa 35 ngày, phù hợp short-term, không dùng cho long-term.
- Manual snapshots (snapshot thủ công): Giữ vĩnh viễn, không tự xóa, lý tưởng cho compliance 5 năm. Có thể tạo theo lịch bằng Lambda + EventBridge.
- Không có tính năng "RDS snapshot schedule" built-in từ console.
- Export snapshot sang S3 (RDS snapshot export) khả dụng nhưng phức tạp cho DB lớn, thời gian dài, chi phí cao hơn, và khôi phục chậm hơn.
Nguồn tham khảo: - AWS RDS Snapshots Documentation (cập nhật 2024-2026).
- RDS Manual Snapshots.
- AWS re:Post & Best Practices for Long-term Backups.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create an AWS Lambda function to run on the first day of every month to take a manual RDS snapshot.
Lý do:
✅ Giải pháp này tạo manual snapshot hàng tháng (ngày đầu tháng qua Lambda + EventBridge), giữ vĩnh viễn 5 năm cho compliance.
✅ Hiệu quả vận hành cao nhất: Tự động hóa hoàn toàn (Lambda serverless, không cần quản lý server), chi phí thấp (chỉ tính phí snapshot storage ~$0.095/GB/tháng), dễ scale, và khôi phục nhanh trong 24h bằng cách restore snapshot thành DB instance mới.
✅ Không có overhead thừa như export S3 hay automated backup (bị xóa). Đây là best practice cho long-term retention theo AWS Well-Architected Framework (Reliability pillar).
📋 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 bằng tiếng Anh. Mỗi phương án được đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm giải thích chi tiết bằng tiếng Việt:
-
❌ Create an AWS Lambda function to run on the first day of every month to take a manual RDS snapshot. Move the snapshot to the company's Amazon S3 bucket.
❌ Sai vì: Bước "move snapshot to S3" sử dụng RDS snapshot export (tính năng export sang Parquet/CSV), nhưng với 5 TB DB, quá trình export mất hàng giờ/ngày, chi phí cao (DataTransfer + S3 storage), và khôi phục phức tạp (import lại thành DB). Không efficient, tăng operational overhead không cần thiết so với giữ manual snapshot gốc (EBS-based). -
✅ Create an AWS Lambda function to run on the first day of every month to take a manual RDS snapshot.
✅ Đúng vì: Tạo manual snapshot định kỳ, giữ lâu dài 5 năm. Lambda + EventBridge (cron schedule) tự động hóa hoàn hảo, chi phí thấp, khôi phục nhanh (restore trực tiếp). Đáp ứng đầy đủ compliance và 24h SLA, là giải pháp efficient nhất. -
❌ Create an RDS snapshot schedule from the AWS Management Console to take a snapshot every 30 days.
❌ Sai vì: AWS RDS không có tính năng "snapshot schedule" từ Management Console. Console chỉ hỗ trợ automated backups (daily, retention max 35 ngày) hoặc manual snapshot thủ công một lần. Không thể schedule snapshot 30 ngày built-in, dẫn đến không tự động hóa và không giữ 5 năm. -
❌ Create an AWS Lambda function to run on the first day of every month to create an automated RDS snapshot.
❌ Sai vì: Không tồn tại API "create automated snapshot" – automated backups chỉ config qua RDS parameter group (daily automatic, retention 0-35 ngày). Lambda chỉ tạo manual snapshot. Automated backup sẽ bị xóa sau retention, không đáp ứng 5 năm compliance.
🎯 Kết luận: Giải pháp ✅ sử dụng Lambda + manual snapshot là optimal, tuân thủ AWS best practices cho DevOps efficiency. Nếu triển khai, thêm tag snapshot cho quản lý và monitor qua CloudWatch! 🚀
Which steps should a Database Specialist take to meet these requirements using an AWS CloudFormation template?
- A Create the database with the MasterUserName and MasterUserPassword properties set to the default values. Then, create the secret with the user name and password set to the same default values. Add a Secret Target Attachment resource with the SecretId and TargetId properties set to the Amazon Resource Names (ARNs) of the secret and the database. Finally, update the secret's password value with a randomly generated string set by the GenerateSecretString property.
- B Add a Mapping property from the database Amazon Resource Name (ARN) to the secret ARN. Then, create the secret with a chosen user name and a randomly generated password set by the GenerateSecretString property. Add the database with the MasterUserName and MasterUserPassword properties set to the user name of the secret.
- C Add a resource of type AWS::SecretsManager::Secret and specify the GenerateSecretString property. Then, define the database user name in the SecureStringTemplate template. Create a resource for the database and reference the secret string for the MasterUserName and MasterUserPassword properties. Then, add a resource of type AWS::SecretsManagerSecretTargetAttachment with the SecretId and TargetId properties set to the Amazon Resource Names (ARNs) of the secret and the database.
- D Create the secret with a chosen user name and a randomly generated password set by the GenerateSecretString property. Add an SecretTargetAttachment resource with the SecretId property set to the Amazon Resource Name (ARN) of the secret and the TargetId property set to a parameter value matching the desired database ARN. Then, create a database with the MasterUserName and MasterUserPassword properties set to the previously created values in the secret.
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 Database Specialist sử dụng AWS CloudFormation template để tự động hóa việc tạo các database test an toàn. Các yêu cầu chính bao gồm:
- Tạo database với credentials ngẫu nhiên (username và password random).
- Lưu credentials an toàn trong AWS Secrets Manager để sử dụng sau và hỗ trợ tự động rotation (xoay vòng credentials).
- Credentials phải chứa đủ thông tin để kết nối database và thực hiện rotation tự động.
- Không được log hoặc lưu credentials ở dạng không mã hóa (unencrypted).
Mục tiêu là tích hợp RDS (Relational Database Service) với Secrets Manager qua CloudFormation, đảm bảo credentials được generate động, tham chiếu an toàn vào resource RDS, và liên kết để enable rotation mà không lộ thông tin nhạy cảm. Đây là best practice cho môi trường test tự động hóa, tránh hardcode hoặc lưu plain text. 📘 (Kiến thức dựa trên AWS CloudFormation User Guide và Secrets Manager docs, cập nhật đến 2026: hỗ trợ native integration RDS-Secrets Manager từ phiên bản CloudFormation 2023+).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Phương án thứ 3
Add a resource of type AWS::SecretsManager::Secret and specify the GenerateSecretString property. Then, define the database user name in the SecureStringTemplate template. Create a resource for the database and reference the secret string for the MasterUserName and MasterUserPassword properties. Then, add a resource of type AWS::SecretsManagerSecretTargetAttachment with the SecretId and TargetId properties set to the Amazon Resource Names (ARNs) of the secret and the database.
Lý do đúng 🛠️:
- Tạo AWS::SecretsManager::Secret với GenerateSecretString để tự động sinh password ngẫu nhiên (và username qua SecretStringTemplate để tùy chỉnh format chứa info kết nối).
- Tham chiếu secret string trực tiếp vào MasterUserName và MasterUserPassword của resource RDS (như AWS::RDS::DBInstance/DBCluster), đảm bảo credentials được inject động mà không lưu plain text trong template.
- Thêm AWS::SecretsManager::SecretTargetAttachment để liên kết secret với DB ARN, enable tự động rotation (RDS sẽ dùng secret để rotate credentials).
- Hoàn toàn tuân thủ yêu cầu: random, an toàn, không log unencrypted, hỗ trợ kết nối/rotation. Đây là workflow chuẩn AWS (xem demo CloudFormation samples 2025). ✅
📋 Phân tích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích cụ thể bằng tiếng Việt dựa trên docs AWS CloudFormation/Secrets Manager (cập nhật 2026).
-
❌ Phương án 1 (SAI):
Create the database with the MasterUserName and MasterUserPassword properties set to the default values. Then, create the secret with the user name and password set to the same default values. Add a Secret Target Attachment resource with the SecretId and TargetId properties set to the Amazon Resource Names (ARNs) của secret and the database. Finally, update the secret's password value with a randomly generated string set by the GenerateSecretString property.Giải thích sai ❌: Sử dụng default values (như admin/admin) ban đầu cho DB và secret → vi phạm "không lưu unencrypted" vì default dễ bị log/expose trong CloudFormation logs hoặc stack events. Update secret sau bằng GenerateSecretString không khớp với DB hiện tại (DB đã tạo với default, dẫn đến mismatch credentials, rotation fail). Không random từ đầu, không an toàn cho test env.
-
❌ Phương án 2 (SAI):
Add a Mapping property from the database Amazon Resource Name (ARN) to the secret ARN. Then, create the secret with a chosen user name and a randomly generated password set by the GenerateSecretString property. Add the database with the MasterUserName and MasterUserPassword properties set to the user name of the secret.Giải thích sai ❌: Mapping chỉ map static values (như regions), không dùng để map dynamic ARN giữa DB và secret (ARN sinh sau khi tạo resource). Không chỉ rõ MasterUserPassword reference secret string → phải hardcode hoặc expose password. Thiếu SecretTargetAttachment → không enable rotation tự động. Credentials không đầy đủ cho kết nối/rotation.
-
✅ Phương án 3 (ĐÚNG):
Add a resource of type AWS::SecretsManager::Secret and specify the GenerateSecretString property. Then, define the database user name in the SecureStringTemplate template. Create a resource for the database and reference the secret string for the MasterUserName and MasterUserPassword properties. Then, add a resource of type AWS::SecretsManagerSecretTargetAttachment with the SecretId and TargetId properties set to the Amazon Resource Names (ARNs) of the secret and the database.Giải thích đúng 🛠️: Như phần trên, full workflow: Generate random creds → reference an toàn vào RDS → attach cho rotation. SecretStringTemplate tùy chỉnh secret chứa username + password + DB info (ví dụ:
{"username":"{{username}}","password":"{{generate-password}}","db":"testdb"}), hỗ trợ kết nối. Không expose plain text nhờ Fn::Ref secret. Perfect match yêu cầu. -
❌ Phương án 4 (SAI):
Create the secret with a chosen user name and a randomly generated password set by the GenerateSecretString property. Add an SecretTargetAttachment resource with the SecretId property set to the Amazon Resource Name (ARN) of the secret and the TargetId property set to a parameter value matching the desired database ARN. Then, create a database with the MasterUserName and MasterUserPassword properties set to the previously created values in the secret.Giải thích sai ❌: TargetId dùng parameter value (static input) thay vì dynamic DB ARN → không tự động hóa (phải pass ARN thủ công, không phù hợp CloudFormation stack tự động). MasterUserName/Password set "previously created values" → phải đọc secret string trước (nhưng secret random, khó reference đúng thứ tự tạo resource, dễ circular dependency hoặc expose). Không dùng SecureStringTemplate, credentials có thể không đầy đủ info kết nối.
📘 Tài liệu tham khảo
- AWS CloudFormation Docs: AWS::SecretsManager::Secret & RDS DBInstance (GenerateSecretString, SecretStringTemplate, MasterUserPassword: !Ref secret).
- Secrets Manager Rotation: RDS Integration Guide & SecretTargetAttachment (cập nhật 2025: hỗ trợ multi-DB attach).
- Sample Template: AWS Samples GitHub:
rds-secrets-manager-cloudformation.yaml(2026 version hỗ trợ Aurora/RDS Proxy).
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ụ YAML template, hỏi thêm nhé.
Database Specialist needs to control the access privileges at the table level.
How can the Database Specialist meet these requirements?
- A Use AWS IAM database authentication and restrict access to the tables using an IAM policy.
- B Configure the rules in a NACL to restrict outbound traffic from the Aurora DB cluster.
- C Execute GRANT and REVOKE commands that restrict access to the tables containing sensitive data.
- D Define access privileges to the tables containing sensitive data in the pg_hba.conf file.
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 bảo mật dữ liệu ở mức độ bảng (table-level access control) trong Amazon Aurora PostgreSQL DB cluster. 🛡️️
- Một công ty sử dụng Aurora PostgreSQL làm backend cho ứng dụng, và cluster chứa các bảng có dữ liệu nhạy cảm (sensitive data).
- Database Specialist cần kiểm soát quyền truy cập (access privileges) chính xác tại mức bảng cụ thể, không phải mức database hoặc instance chung.
- Yêu cầu là tìm cách hợp lý, chuẩn AWS để đáp ứng, dựa trên tính năng bảo mật của Aurora PostgreSQL (hỗ trợ đầy đủ PostgreSQL privileges, IAM auth, nhưng phân quyền chi tiết vẫn theo SQL standard).
📘 Kiến thức nền: Aurora PostgreSQL (phiên bản mới nhất đến 2026: hỗ trợ PostgreSQL 15+ và Aurora PostgreSQL 15.x) kế thừa toàn bộ engine PostgreSQL cho authorization (quyền sau khi authenticate), sử dụng SQL commands. Không có thay đổi lớn về row/table-level security ngoài RLS (Row-Level Security), nhưng ở đây là table-level cơ bản.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Execute GRANT and REVOKE commands that restrict access to the tables containing sensitive data.
🛠️ Lý do chi tiết:
- Đây là phương pháp chuẩn của PostgreSQL (và Aurora PostgreSQL) để quản lý quyền truy cập ở mức table-level (SELECT, INSERT, UPDATE, DELETE... trên bảng cụ thể).
- Database Specialist có thể chạy lệnh SQL như
GRANT SELECT ON sensitive_table TO role_user;hoặcREVOKE ALL ON sensitive_table FROM public;để cấp/thu hồi quyền cho user/role cụ thể. - Hoàn toàn tích hợp native với Aurora, không cần config thêm, hỗ trợ multi-user/multi-role, và an toàn cao cho dữ liệu nhạy cảm.
- Phù hợp best practice AWS cho fine-grained access control trong RDS/Aurora.
📋 Giải thích tất cả các phương án (đúng/sai)
-
❌ Use AWS IAM database authentication and restrict access to the tables using an IAM policy.
Sai vì: IAM database authentication chỉ xử lý xác thực (authentication) – map IAM user vào PostgreSQL role để kết nối DB. IAM policy không hỗ trợ authorization chi tiết đến table-level (chỉ coarse-grained như connect/execute). Phải dùng GRANT/REVOKE sau khi auth. (Aurora PostgreSQL IAM auth từ version 10+, nhưng không thay thế SQL privileges). -
❌ Configure the rules in a NACL to restrict outbound traffic from the Aurora DB cluster.
Sai vì: NACL (Network ACL) là network-layer control (stateless firewall cho VPC subnet), chỉ chặn traffic ra/vào (IP/port-based). Không kiểm soát quyền truy cập dữ liệu bên trong DB ở mức table, chỉ ảnh hưởng kết nối tổng thể – không fine-grained. -
✅ Execute GRANT and REVOKE commands that restrict access to the tables containing sensitive data.
Đúng vì: Như giải thích trên, đây là cơ chế core của PostgreSQL/Aurora cho table privileges. Linh hoạt, audit được qua logs, và scale tốt với roles/groups. -
❌ Define access privileges to the tables containing sensitive data in the pg_hba.conf file.
Sai vì:pg_hba.confchỉ config host-based authentication (ai được phép kết nối từ IP/user/database, dựa trên md5/SCRAM). Không quản lý privileges trên table (như SELECT/INSERT). Chỉ đọc ở DB parameter group, không phải nơi định nghĩa table access.
📚 Tài liệu tham khảo (AWS cập nhật 2026)
- AWS Docs - Aurora PostgreSQL Security: Identity and access management for Aurora PostgreSQL & PostgreSQL privileges.
- PostgreSQL Docs (Aurora tương thích): GRANT/REVOKE: https://www.postgresql.org/docs/current/sql-grant.html; pg_hba.conf: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html.
- AWS Exam Guide DOP-C02: Nhấn mạnh SQL-based access control cho RDS/Aurora.
Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần thêm ví dụ SQL, hỏi nhé! 😊
Aurora.
Which action can the Database Specialist take to test the resiliency of the Aurora DB cluster?
- A Stop the DB cluster and analyze how the website responds
- B Use Aurora fault injection to crash the master DB instance
- C Remove the DB cluster endpoint to simulate a master DB instance failure
- D Use Aurora Backtrack to crash the DB cluster
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS Aurora
✅ Nội dung câu hỏi được giải thích rõ ràng:
Câu hỏi xoay quanh một Database Specialist đang hỗ trợ công ty triển khai website mới sử dụng Amazon Aurora (với nhiều Aurora Replicas), thay thế cho website on-premises kết nối với cơ sở dữ liệu quan hệ legacy có vấn đề ổn định. Công ty muốn test tính kiên cường (resiliency) của Aurora DB cluster để đảm bảo hệ thống chịu lỗi tốt.
🛠️ Mục tiêu chính: Tìm hành động phù hợp để mô phỏng lỗi (fault simulation) trên Aurora DB cluster, kiểm tra khả năng failover tự động (từ primary/master sang replica) mà không làm gián đoạn thực tế. Aurora nổi bật với high availability (HA) nhờ multi-AZ deployment và automatic failover trong vòng 30 giây. Đây là kiến thức cốt lõi trong AWS Certified DevOps Engineer Professional (DOP-C02), cập nhật đến 2026 với Aurora Serverless v2 và enhanced monitoring.
🟢 Đáp án đúng và lý do lựa chọn:
Đáp án đúng là: Use Aurora fault injection to crash the master DB instance.
📘 Lý do chi tiết: Aurora cung cấp tính năng Fault Injection Queries (FIQ) (ra mắt từ 2021 và cập nhật liên tục đến 2026) cho phép mô phỏng các lỗi cụ thể như crash instance (kill primary/master DB instance) một cách an toàn, không ảnh hưởng dữ liệu thực. Điều này kích hoạt automatic failover sang replica, giúp test resiliency thực tế: website tiếp tục hoạt động qua cluster endpoint (writer endpoint tự động chuyển sang replica mới). FIQ hỗ trợ các scenario như CALL mysql.rds_kill_query, failover, pause_instance, v.v., lý tưởng cho Chaos Engineering trong AWS.
❌ Phân tích tất cả các phương án (đúng/sai):
-
❌ [SAI] Stop the DB cluster and analyze how the website responds
🧩 Giải thích sai: Việc stop toàn bộ DB cluster sẽ tắt tất cả instances (primary + replicas), dẫn đến downtime hoàn toàn (website không kết nối được DB). Không test được failover hay resiliency vì không có replica nào hoạt động. Thay vào đó, chỉ nên stop primary instance riêng lẻ để test HA. -
✅ [ĐÚNG] Use Aurora fault injection to crash the master DB instance
🛠️ Giải thích đúng: Như đã nêu, FIQ là công cụ chính thức của AWS để inject faults như crash master, kích hoạt failover nhanh chóng (dưới 30s). Website sử dụng cluster endpoint sẽ tự động redirect traffic, chứng minh resiliency. Hỗ trợ MySQL/PostgreSQL Aurora. -
❌ [SAI] Remove the DB cluster endpoint to simulate a master DB instance failure
🧩 Giải thích sai: DB cluster endpoint (writer endpoint) là DNS tự động cập nhật primary instance; xóa nó chỉ làm client không kết nối được, không simulate failure thực (không trigger failover). Endpoint không thể "remove" trực tiếp mà phải modify cluster, gây hỗn loạn không kiểm soát. -
❌ [SAI] Use Aurora Backtrack to crash the DB cluster
🛠️ Giải thích sai: Aurora Backtrack chỉ dùng để rewind DB logs về thời điểm trước (trong 72 giờ, trên binlog), hỗ trợ recovery nhanh mà không crash cluster. Nó dành cho mistake recovery, không phải test fault tolerance hay resiliency.
📘 Tài liệu tham khảo (cập nhật 2026):
- AWS Docs: Amazon Aurora Fault Injection Queries – Hướng dẫn FIQ chi tiết.
- AWS Whitepaper: Amazon Aurora – Design for the Cloud.
- Exam Guide DOP-C02: Domain 4 (Automation & Optimization) – Resiliency testing với FIQ.
- AWS Well-Architected Framework: Reliability Pillar – Fault Injection best practices.
Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần thêm ví dụ code FIQ, hãy hỏi nhé!
Which set of steps should the Database Specialist take to most efficiently find the problematic PostgreSQL query?
- A Create an Amazon CloudWatch dashboard to show the number of connections, CPU usage, and disk space consumption. Watch these dashboards during the next slow period.
- B Launch an Amazon EC2 instance, and install and configure an open-source PostgreSQL monitoring tool that will run reports based on the output error logs.
- C Modify the logging database parameter to log all the queries related to locking in the database and then check the logs after the next slow period for this information.
- D Enable Amazon RDS Performance Insights on the PostgreSQL database. Use the metrics to identify any queries that are related to spikes in the graph during the next slow period.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi mô tả tình huống một công ty đã migrate cơ sở dữ liệu từ Oracle on-premises sang Amazon Aurora PostgreSQL (một dịch vụ RDS managed với engine PostgreSQL, hỗ trợ scale cao và performance tốt hơn). Sau migration, ứng dụng gặp vấn đề response time chậm rõ rệt vào khoảng 3:00 PM hàng ngày, và công ty đã xác định nguyên nhân nằm ở database chứ không phải ứng dụng.
Nhiệm vụ của Database Specialist là tìm bộ các bước hiệu quả nhất để xác định query PostgreSQL gây vấn đề. Câu hỏi tập trung vào việc troubleshoot performance một cách nhanh chóng, chính xác, sử dụng các công cụ AWS native, thay vì các phương pháp thủ công hoặc kém tối ưu. Đây là chủ đề phổ biến trong kỳ thi AWS Certified Database - Specialty hoặc DevOps Engineer Professional, nhấn mạnh vào Performance Insights như giải pháp best practice cho RDS/Aurora (cập nhật đến 2026, feature này đã hỗ trợ PostgreSQL đầy đủ với Top SQL, wait events, và drill-down metrics).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Enable Amazon RDS Performance Insights on the PostgreSQL database. Use the metrics to identify any queries that are related to spikes in the graph during the next slow period.
Lý do:
- 🛠️ Performance Insights là tính năng native của Amazon RDS/Aurora (hỗ trợ PostgreSQL từ lâu, cập nhật mới nhất 2026 với enhanced SQL analytics và AI insights), cho phép enable chỉ với vài cú click mà không cần thay đổi code hay infrastructure.
- Nó cung cấp dashboard trực quan với top SQL queries, wait events, CPU/load spikes, và historical data (lưu trữ 2 tuần miễn phí hoặc dài hơn với retention). Database Specialist chỉ cần observe graph spikes lúc 3PM và drill-down để pinpoint query cụ thể gây chậm (ví dụ: query locking, I/O heavy).
- Hiệu quả nhất vì zero-downtime enable, no additional cost cơ bản, và tự động capture queries mà không cần log thủ công. Đây là best practice AWS khuyến nghị cho performance troubleshooting (nhanh hơn các tool third-party).
📋 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 phương án, giữ nguyên nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên kiến thức AWS mới nhất (Aurora PostgreSQL 16.x hỗ trợ Performance Insights full).
-
Phương án A: Create an Amazon CloudWatch dashboard to show the number of connections, CPU usage, and disk space consumption. Watch these dashboards during the next slow period.
❌ Sai vì: CloudWatch chỉ theo dõi metrics tổng quát (connections, CPU, disk) mà không capture chi tiết SQL queries. Nó giúp detect spike nhưng không identify query cụ thể gây vấn đề (ví dụ: query nào lock table?). Phải watch thủ công realtime, kém hiệu quả so với automated drill-down, và không phải best practice cho query-level troubleshooting. -
Phương án B: Launch an Amazon EC2 instance, and install and configure an open-source PostgreSQL monitoring tool that will run reports based on the output error logs.
❌ Sai vì: Yêu cầu launch EC2 riêng, install tool open-source (như pgBadger hoặc check_postgres.pl), và parse error logs – quá phức tạp, tốn thời gian, chi phí, và không scalable. Error logs chỉ capture errors chứ không phải tất cả queries chậm, vi phạm nguyên tắc managed service của Aurora (tránh tự manage monitoring). Không hiệu quả cho production troubleshooting. -
Phương án C: Modify the logging database parameter to log all the queries related to locking in the database and then check the logs after the next slow period for this information.
❌ Sai vì: Thay đổi DB parameter (nhưlog_lock_waits,log_statement) để log locking queries gây overhead cao (tăng I/O, CPU, có thể làm chậm hơn), không capture tất cả queries chậm (chỉ locking-specific), và phải manually parse logs từ CloudWatch Logs/ S3. Không trực quan, không realtime, và kém hiệu quả so với Performance Insights (có thể cần restart DB). -
Phương án D (Đúng): Enable Amazon RDS Performance Insights on the PostgreSQL database. Use the metrics to identify any queries that are related to spikes in the graph during the next slow period.
✅ Đúng vì: Như đã giải thích ở trên, đây là giải pháp hiệu quả nhất với enable nhanh (qua Console/CLI), visual graphs cho spikes, top SQL identification tự động, và hỗ trợ PostgreSQL đầy đủ (bao gồm EXPLAIN plans). Không overhead lớn, phù hợp production.
📘 Tài liệu tham khảo
- AWS Documentation (2026 update): Amazon RDS Performance Insights – Hướng dẫn enable và sử dụng cho Aurora PostgreSQL.
- Aurora Best Practices: Troubleshooting Aurora PostgreSQL Performance.
- Exam Prep: AWS Certified Database - Specialty Sample Questions (tương tự DOP-C02 DevOps).
- Video Guide: AWS re:Invent 2025 sessions về RDS Monitoring (Performance Insights enhancements).
Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần thêm ví dụ thực hành, hãy hỏi nhé!