Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
A database administrator wants to make the process of storing and modifying these parameters more systematic. The database administrator also wants to ensure that changes to individual categories of configurations are automatically applied to all instances when required.
Which AWS service or feature will help automate and achieve this objective?
- A AWS Systems Manager Parameter Store
- B DB parameter group
- C AWS Config
- D AWS Secrets Manager
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 lớn đang sử dụng nhiều Amazon DB clusters (cụm cơ sở dữ liệu RDS như MySQL, PostgreSQL, Aurora, v.v.), mỗi cụm có các configurations (cấu hình tham số) khác nhau tùy theo đội ngũ và trường hợp sử dụng, được nhóm thành các categories lớn hơn.
Quản trị viên cơ sở dữ liệu (DBA) muốn:
- Lưu trữ và sửa đổi các tham số một cách hệ thống hơn (systematic).
- Tự động áp dụng thay đổi cho tất cả instances trong cùng một category khi cần thiết.
📌 Mục tiêu chính: Tìm dịch vụ hoặc tính năng AWS giúp tự động hóa việc quản lý và áp dụng tham số DB một cách tập trung, không cần chỉnh sửa thủ công từng instance. Đây là vấn đề phổ biến trong RDS/Aurora, nơi cần quản lý parameters ở mức group để scale và maintain dễ dàng.
✅ Đáp án đúng: DB parameter group
Lý do lựa chọn:
DB parameter group là tính năng cốt lõi của Amazon RDS (bao gồm DB clusters như Aurora), cho phép nhóm các tham số cấu hình DB (như buffer pool size, log settings, timeout, v.v.) thành các category.
- Khi tạo và gắn parameter group vào DB instances/clusters, mọi thay đổi ở group sẽ tự động áp dụng cho tất cả instances thuộc group đó (sau reboot nếu cần).
- Hỗ trợ custom parameter groups để tùy chỉnh theo team/use case, và default groups cho chuẩn AWS.
🛠️ Ưu điểm: Hoàn hảo cho việc "storing and modifying parameters systematically" và "automatically applied to all instances". Đây là best practice theo AWS Well-Architected Framework (Reliability pillar) đến năm 2026.
📋 Phân tích tất cả các phương án
Dưới đây là giải thích chi tiết từng lựa chọn, với đánh giá đúng/sai dựa trên chức năng thực tế của AWS (cập nhật đến 2026):
-
❌ AWS Systems Manager Parameter Store
❌ Sai: Parameter Store dùng để lưu trữ tham số dạng key-value (như config strings, numbers) cho ứng dụng/EC2/Lambda, hỗ trợ hierarchical storage và integration với SSM. Tuy nhiên, nó không dành riêng cho DB parameters, không tự động áp dụng vào RDS instances/clusters, và không xử lý DB-specific settings như engine parameters. Phải dùng script thủ công để inject, không systematic cho DB. -
✅ DB parameter group
✅ Đúng: Như giải thích trên, đây là giải pháp chính thức của RDS để quản lý tập trung parameters cho DB instances/clusters. Thay đổi group → tự động propagate (apply sau modify/reboot). Hỗ trợ RDS Proxy và Aurora Serverless v2 (2026 updates). Lý tưởng cho multi-team scenarios. -
❌ AWS Config
❌ Sai: AWS Config dùng để ghi nhận và đánh giá compliance của resources (như rules cho security/config drift). Nó có thể monitor DB parameters nhưng không lưu trữ, sửa đổi hay tự động áp dụng changes. Chỉ là công cụ audit, không phải quản lý parameters. -
❌ AWS Secrets Manager
❌ Sai: Secrets Manager chuyên lưu trữ và rotate secrets (như DB passwords, API keys) an toàn, tích hợp với RDS. Nhưng nó không quản lý DB configuration parameters (như tuning settings), chỉ xử lý credentials. Không hỗ trợ categories hay auto-apply cho configs.
📘 Tài liệu tham khảo
- AWS RDS Parameter Groups: docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html (Cập nhật 2026: Hỗ trợ dynamic parameters cho Aurora).
- AWS Well-Architected: Operational Excellence: docs.aws.amazon.com/wellarchitected/latest/operational-excellence-pillar.
- RDS Best Practices: AWS re:Post và Exam Content Outline DOP-C02 (DevOps Pro 2026).
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ụ code hoặc lab, hãy hỏi nhé!
Recently, a change was made to an AWS::RDS::DBInstance resource in the template. The CharacterSetName property was changed to allow the application to process international text. A change set was generated using the new template, which indicated that the existing DB instance should be replaced during an upgrade.
What should a database specialist do to prevent data loss during the stack upgrade?
- A Create a snapshot of the DB instance. Modify the template to add the DBSnapshotIdentifier property with the ID of the DB snapshot. Update the stack.
- B Modify the stack policy using the aws cloudformation update-stack command and the set-stack-policy command, then make the DB resource protected.
- C Create a snapshot of the DB instance. Update the stack. Restore the database to a new instance.
- D Deactivate any applications that are using the DB instance. Create a snapshot of the DB instance. Modify the template to add the DBSnapshotIdentifier property with the ID of the DB snapshot. Update the stack and reactivate the applications.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi này xoay quanh tình huống AWS CloudFormation khi cập nhật stack chứa tài nguyên AWS::RDS::DBInstance (instance cơ sở dữ liệu RDS). Cụ thể:
- Một công ty đang build web app mới với CloudFormation template.
- Gần đây, thay đổi thuộc tính CharacterSetName của RDS DB instance để hỗ trợ xử lý text quốc tế (international text).
- Khi tạo change set từ template mới, AWS chỉ ra rằng DB instance hiện tại phải bị thay thế (replaced) trong quá trình upgrade stack.
- Vấn đề cốt lõi: Việc thay thế DB instance sẽ dẫn đến mất dữ liệu (data loss) nếu không xử lý đúng cách, vì RDS không hỗ trợ update in-place cho thuộc tính CharacterSetName (theo quy tắc CloudFormation và RDS, thay đổi này yêu cầu replacement hoàn toàn).
- Mục tiêu: Database specialist cần làm gì để ngăn chặn mất dữ liệu trong lúc upgrade stack?
🛠️ Kiến thức AWS liên quan (cập nhật đến 2026):
- Thuộc tính CharacterSetName của RDS là replacement-required (không thể update mà không thay thế instance).
- Khi CloudFormation replace RDS instance, nó tạo instance mới song song, migrate data nếu có thể, rồi delete instance cũ. Nhưng với CharacterSetName, migration không tự động → cần snapshot để khôi phục data.
- Sử dụng DBSnapshotIdentifier trong template để chỉ định snapshot, giúp instance mới được tạo từ snapshot đó, đảm bảo zero data loss.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Deactivate any applications that are using the DB instance. Create a snapshot of the DB instance. Modify the template to add the DBSnapshotIdentifier property with the ID of the DB snapshot. Update the stack and reactivate the applications.
Lý do chọn đáp án này ✅:
- Đây là quy trình chuẩn AWS để replace RDS mà không mất data:
- Deactivate apps → Tránh connection conflicts trong quá trình replace (downtime ngắn).
- Tạo snapshot → Backup data đầy đủ trước replace.
- Thêm DBSnapshotIdentifier vào template → CloudFormation sẽ tạo DB mới từ snapshot, migrate data seamless (instance cũ bị delete sau khi new ready).
- Update stack → Thực hiện thay đổi an toàn.
- Reactivate apps → Khôi phục service.
- Đảm bảo zero data loss, phù hợp với best practice DevOps cho production RDS.
📋 Giải thích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI: Create a snapshot of the DB instance. Modify the template to add the DBSnapshotIdentifier property with the ID of the DB snapshot. Update the stack.
Phân tích: Phương án này gần đúng nhưng thiếu bước deactivate apps. Nếu apps đang connect active, quá trình replace có thể gây connection errors, data inconsistency hoặc downtime dài (RDS failover không mượt). AWS khuyến nghị ngắt kết nối trước snapshot/replace để tránh rủi ro. -
❌ Phương án SAI: Modify the stack policy using the aws cloudformation update-stack command and the set-stack-policy command, then make the DB resource protected.
Phân tích: Stack policy chỉ bảo vệ (protect) resource khỏi DELETE/REPLACE trong update, không giải quyết vấn đề data loss. Nó sẽ block toàn bộ update (stack không thay đổi), không áp dụng thay đổi CharacterSetName. Không phải giải pháp thực tế cho upgrade. -
❌ Phương án SAI: Create a snapshot of the DB instance. Update the stack. Restore the database to a new instance.
Phân tích: Update stack sẽ replace DB cũ (delete sau), dẫn đến data loss vì không dùng snapshot trong template. Phải restore thủ công sau → manual process, không tự động, tăng downtime và rủi ro (không phải CloudFormation-native). Không seamless cho production. -
✅ Phương án ĐÚNG: Deactivate any applications that are using the DB instance. Create a snapshot of the DB instance. Modify the template to add the DBSnapshotIdentifier property with the ID of the DB snapshot. Update the stack and reactivate the applications.
Phân tích: Như đã giải thích ở phần ✅, đây là best practice đầy đủ: Ngắt app → Snapshot → Template với DBSnapshotIdentifier → Update → Khôi phục. CloudFormation tự handle replacement từ snapshot, đảm bảo data integrity và minimal downtime.
📘 Tài liệu tham khảo AWS (cập nhật 2026)
- AWS CloudFormation User Guide: AWS::RDS::DBInstance → Xác nhận CharacterSetName là replacement property; DBSnapshotIdentifier cho restore từ snapshot.
- RDS User Guide: Modifying DB Instance → Thay đổi CharacterSet yêu cầu replacement + snapshot best practice.
- CloudFormation Best Practices: Update Behavior → Stack policy và replacement logic.
- Exam Prep DOP-C02: Topic "Deployment" & "Infrastructure as Code" (AWS re:Post & A Cloud Guru 2026 updates).
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ụ CLI hoặc lab, hãy hỏi nhé!
Which solution meets these requirements?
- A Create a snapshot of the source DB instance in the source account. Share the snapshot with the destination account. In the target account, create a DB instance from the snapshot.
- B Use AWS Resource Access Manager to share the source DB instance with the destination account. Create a DB instance in the destination account using the shared resource.
- C Create a read replica of the DB instance. Give the destination account access to the read replica. In the destination account, create a snapshot of the shared read replica and provision a new RDS for MySQL DB instance.
- D Use mysqldump to back up the source database. Create an RDS for MySQL DB instance in the destination account. Use the mysql command to restore the backup in the destination database.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh tình huống một công ty mua lại doanh nghiệp mới và cần di chuyển (migrate) một instance Amazon RDS for MySQL không được mã hóa (unencrypted) với dung lượng 12 TB từ tài khoản AWS nguồn (source account) sang tài khoản AWS đích (destination account). Yêu cầu chính là giảm thiểu thời gian migrate (minimize the amount of time required).
🔍 Chi tiết vấn đề:
- RDS MySQL là dịch vụ cơ sở dữ liệu quan hệ được quản lý bởi AWS.
- Dung lượng lớn (12 TB) đòi hỏi phương pháp nhanh, tránh các công cụ dump/restore thủ công vì sẽ mất hàng giờ/ngày.
- Không mã hóa → Có thể share snapshot trực tiếp cross-account mà không cần copy hoặc KMS key.
- Mục tiêu: Giữ nguyên tính toàn vẹn dữ liệu, nhanh chóng, và tuân thủ best practices AWS (không downtime dài).
🛠️ Yêu cầu kỹ thuật: Sử dụng tính năng native của RDS để migrate cross-account với thời gian ngắn nhất (snapshot + share + restore).
✅ Đáp án đúng
Create a snapshot of the source DB instance in the source account. Share the snapshot with the destination account. In the target account, create a DB instance from the snapshot.
Lý do chọn đáp án này:
- Đây là phương pháp nhanh nhất và hiệu quả nhất cho RDS unencrypted cross-account migration.
- 📊 Quy trình: Tạo snapshot (thời gian ≈ kích thước DB, song song hóa), share snapshot (gần như tức thì), restore DB instance mới ở account đích (parallel restore, nhanh cho large DB).
- Với 12 TB, thời gian tổng ~ vài giờ (snapshot + restore), không cần dump dữ liệu.
- ✅ Ưu điểm: Native AWS, zero data transfer cost ngoài snapshot storage, hỗ trợ MySQL, và giữ nguyên unencrypted status.
- Không vi phạm giới hạn (RDS hỗ trợ snapshot up to petabytes).
📋 Giải thích tất cả các phương án
Dưới đây là phân tích từng lựa chọn một cách chi tiết, với đánh giá đúng/sai dựa trên docs AWS mới nhất (2024-2026). Giữ nguyên văn bản gốc, chỉ giải thích bằng tiếng Việt.
-
✅ Create a snapshot of the source DB instance in the source account. Share the snapshot with the destination account. In the target account, create a DB instance from the snapshot.
Giải thích: Phương án đúng tuyệt đối. Snapshot RDS unencrypted có thể share cross-account trực tiếp qua console/CLI/API (permission:rds:ModifyDBSnapshotAttribute). Restore ở account đích tạo DB instance mới nhanh chóng, parallel I/O. Thời gian minimize nhờ không copy dữ liệu vật lý (chỉ metadata share). Hoàn hảo cho 12 TB. -
❌ Use AWS Resource Access Manager to share the source DB instance with the destination account. Create a DB instance in the destination account using the shared resource.
Giải thích: Sai. AWS RAM (Resource Access Manager) không hỗ trợ share RDS DB instances trực tiếp (chỉ share resources như Transit Gateway, License Configurations, Aurora clusters một phần). DB instance là regional resource, không share cross-account qua RAM. Thử sẽ fail, không minimize thời gian. -
❌ Create a read replica of the DB instance. Give the destination account access to the read replica. In the destination account, create a snapshot of the shared read replica and provision a new RDS for MySQL DB instance.
Giải thích: Sai và phức tạp hóa. Read replica không share cross-account trực tiếp (replica chỉ trong cùng account/region hoặc cross-region cùng account). "Give access" không khả thi (no IAM policy cho phép). Phải snapshot replica rồi share (thêm bước), tăng thời gian (replica lag + snapshot extra). Không nhanh bằng snapshot gốc. -
❌ Use mysqldump to back up the source database. Create an RDS for MySQL DB instance in the destination account. Use the mysql command to restore the backup in the destination database.
Giải thích: Sai hoàn toàn cho yêu cầu. mysqldump là logical backup, với 12 TB sẽ mất hàng tuần (serial dump/restore, network bottleneck). Không parallel, CPU-intensive, downtime cao. AWS khuyến cáo tránh cho large DB; thay bằng snapshot native. Không minimize thời gian.
📘 Tài liệu tham khảo (AWS docs cập nhật 2026)
- RDS Snapshots Cross-Account: Sharing a manual DB snapshot (hỗ trợ unencrypted trực tiếp).
- RDS Migration Best Practices: Migrating RDS databases – Khuyến nghị snapshot/share cho cross-account.
- RAM Limitations: AWS RAM supported services – Không liệt kê RDS DB instances.
- Large DB Migration: AWS Well-Architected Framework – Storage Lens (2025 update) nhấn mạnh parallel snapshot/restore.
🛡️ Lời khuyên DevOps: Luôn test snapshot restore trước production. Sử dụng DMS nếu ongoing replication cần, nhưng ở đây one-time migrate → snapshot best! 🚀
What should a database specialist do to resolve this issue while minimizing access to external resources?
- A Add a route to an internet gateway in the subnet's route table.
- B Add a route to a NAT gateway in the subnet's route table.
- C Assign a new security group to the EC2 instances with an outbound rule to ports 80 and 443.
- D Create a VPC endpoint for DynamoDB and add a route to the endpoint in the subnet's route table.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một tình huống thực tế trên AWS: Công ty có các ứng dụng chạy trên EC2 instances nằm trong private subnet không có kết nối internet. Họ triển khai ứng dụng mới cần sử dụng Amazon DynamoDB, nhưng ứng dụng không kết nối được với các bảng DynamoDB dù developer đã kiểm tra permissions (IAM roles/policies) đều đúng.
Vấn đề cốt lõi: Private subnet không có route ra internet, nên EC2 không thể truy cập các dịch vụ AWS public endpoints như DynamoDB (mặc định qua public internet).
Yêu cầu giải quyết: Phải minimize access to external resources (giảm thiểu truy cập tài nguyên bên ngoài), nghĩa là tránh mở đường ra internet công khai, ưu tiên kết nối private, an toàn và chi phí thấp.
🛠️ Giải pháp lý tưởng: Sử dụng VPC Endpoint (cụ thể là Gateway Endpoint cho DynamoDB) để kết nối nội bộ VPC với DynamoDB mà không cần internet gateway hay NAT. Đây là best practice theo AWS Well-Architected Framework (Pillar: Security & Reliability) cập nhật đến 2026.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a VPC endpoint for DynamoDB and add a route to the endpoint in the subnet's route table.
Lý do:
- VPC Endpoint (Gateway type cho DynamoDB) tạo đường kết nối private trực tiếp từ VPC đến DynamoDB qua AWS backbone network, không qua internet công khai.
- Thêm route vào route table của private subnet (prefix list
pl-cho DynamoDB) sẽ định tuyến traffic nội bộ. - Minimize external access: Không cần IGW/NAT, zero data transfer cost cho Gateway Endpoint, tăng security (traffic không rời VPC).
- Permissions IAM đã OK, chỉ cần routing. Theo AWS 2026, hỗ trợ Interface/Gateway Endpoints với policy-based access control nâng cao.
📘 Tài liệu tham khảo: AWS VPC Endpoints Documentation & DynamoDB VPC Endpoints.
📋 Giải thích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể:
-
❌ [SAI] Add a route to an internet gateway in the subnet's route table.
Giải thích sai: Internet Gateway (IGW) chỉ hoạt động với public subnet (cần route 0.0.0.0/0 -> IGW và public IP). Private subnet thêm IGW sẽ không có tác dụng vì thiếu public IP và auto-assign. Điều này không minimize external access (traffic đi qua public internet, rủi ro bảo mật cao, chi phí data transfer). Không giải quyết vấn đề private connectivity. -
❌ [SAI] Add a route to a NAT gateway in the subnet's route table.
Giải thích sai: NAT Gateway cho phép private subnet outbound internet (route 0.0.0.0/0 -> NAT trong public subnet). Ứng dụng sẽ kết nối DynamoDB qua public endpoint, nhưng không minimize external (vẫn qua internet, NAT cần public subnet + EIP, chi phí hourly + data transfer cao ~$0.045/GB). AWS khuyến nghị tránh NAT cho AWS services nếu có VPC Endpoint. -
❌ [SAI] Assign a new security group to the EC2 instances with an outbound rule to ports 80 and 443.
Giải thích sai: Security Group chỉ kiểm soát traffic firewall (allow HTTPS 443 cho DynamoDB), nhưng không giải quyết routing. Private subnet vẫn thiếu đường ra (no route to internet/DynamoDB endpoint). Permissions IAM OK rồi, vấn đề là network layer (Layer 3), không phải Layer 4. Thêm SG chỉ vô ích nếu không có route. -
✅ [ĐÚNG] Create a VPC endpoint for DynamoDB and add a route to the endpoint in the subnet's route table.
Giải thích đúng: Như phần trên, đây là giải pháp private, zero-cost data transfer, secure (traffic trong AWS network). Tạo Gateway Endpoint (comDHENdynamoDB), lấy prefix list ID từ AWS console/CLI (aws ec2 describe-prefix-lists), thêm routepl-xxxx -> vpce-xxxxvào private route table. Hỗ trợ multi-region/endpoint policy đến 2026.
🛠️ Lời khuyên thực hành: Sử dụng AWS Console/CLI/Terraform để tạo endpoint: aws ec2 create-vpc-endpoint --vpc-id vpc-xxx --service-name com.amazonaws.region.dynamodb. Test bằng aws dynamodb list-tables từ EC2. Best practice cho hybrid/multi-account với AWS PrivateLink! 🚀
How should the database engineer meet this requirement?
- A Modify the DB instance to use an instance class that provides more local SSD storage.
- B Modify the Aurora DB cluster to enable automatic volume resizing.
- C Increase the local storage by upgrading the database engine version.
- D Modify the DB instance and configure the required storage volume in the configuration section.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi tập trung vào tình huống Amazon CloudWatch metric FreeLocalStorage trên một Amazon Aurora MySQL DB instance đang ở mức dưới 10 MB. Đây là chỉ số đo lường lượng local storage tạm thời (local SSD storage) còn trống trên instance, dùng cho các hoạt động như sorting, temporary tables hoặc buffer cache. Khi chỉ số này thấp (dưới 10 MB), có nguy cơ out-of-memory (OOM) hoặc hiệu suất kém.
Nhiệm vụ của database engineer là tăng local storage cho Aurora DB instance.
Lưu ý quan trọng: Aurora không sử dụng local storage như EC2 thông thường; local storage ở đây là bộ nhớ tạm trên instance (dựa trên loại instance class), khác với cluster volume storage chính (managed và auto-scale). Giải pháp phải dựa trên đặc tính của Aurora (phiên bản mới nhất AWS 2026: Aurora hỗ trợ instance class với NVMe SSD lớn hơn như db.r6g, db.r7g).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Modify the DB instance to use an instance class that provides more local SSD storage.
Lý do: 🛠️ Local storage của Aurora DB instance phụ thuộc trực tiếp vào instance class (ví dụ: db.t4g.micro có ít local storage ~7GB, trong khi db.r7g.4xlarge có hàng TB NVMe SSD). Việc modify DB instance để chọn instance class lớn hơn (scale-up) là cách duy nhất và chính thức để tăng FreeLocalStorage. Quy trình: Sử dụng AWS Console/CLI modify-db-instance với tham số --db-instance-class. Không downtime nếu dùng Multi-AZ hoặc read replica. Đây là best practice từ AWS (cập nhật 2026: hỗ trợ instance Graviton3/4 với local storage lớn hơn).
📋 Phân tích tất cả các phương án
-
✅ Modify the DB instance to use an instance class that provides more local SSD storage.
Đúng vì local storage được cung cấp bởi hardware của instance class (NVMe SSD ephemeral). Scale-up instance class là giải pháp chuẩn, nhanh chóng và không ảnh hưởng cluster volume. AWS khuyến nghị theo dõi FreeLocalStorage và scale instance nếu <20% available. -
❌ Modify the Aurora DB cluster to enable automatic volume resizing.
Sai vì automatic volume resizing chỉ áp dụng cho cluster volume storage chính (dung lượng lưu trữ dữ liệu bền vững, auto-grow lên đến 128 TiB). Nó không ảnh hưởng đến FreeLocalStorage (local SSD tạm thời trên instance). Tính năng này dành cho provisioned IOPS, không phải local buffer. -
❌ Increase the local storage by upgrading the database engine version.
Sai vì upgrading engine version (ví dụ từ MySQL 8.0 sang 8.0 mới hơn) chỉ cải thiện tính năng, performance engine, bảo mật, không thay đổi local storage hardware. Local storage phụ thuộc instance class, không phải engine version (xác nhận AWS 2026: không có thay đổi này). -
❌ Modify the DB instance and configure the required storage volume in the configuration section.
Sai vì Aurora không cho phép configure storage volume thủ công như RDS thông thường. Local storage là ephemeral và fixed theo instance class, không có "configuration section" để set kích thước. Cluster storage là managed-auto, không chỉnh tay trên instance.
📘 Tài liệu tham khảo
- AWS Documentation (Aurora Storage & Metrics, cập nhật 2026):
Amazon Aurora Storage – Giải thích local storage vs. cluster volume.
CloudWatch Metrics for Aurora – Chi tiết FreeLocalStorage và khuyến nghị scale instance.
Modifying DB Instance Class – Hướng dẫn scale-up local storage. - AWS Best Practices: Trong DOP-C02 exam guide (DevOps Professional 2026), nhấn mạnh monitoring FreeLocalStorage và scale instance class.
🧐 Mẹo thi: Luôn phân biệt local storage (instance-bound) vs. cluster storage (shared) trong Aurora!
What should the database specialist do to meet these requirements? (Choose two.)
- A Create an RDS event subscription to the audit event type.
- B Enable auditing of CONNECT and QUERY_DML events.
- C SSH to the DB instance and review the database logs.
- D Publish the database logs to Amazon CloudWatch Logs.
- E Enable Enhanced Monitoring on the DB instance.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh một ứng dụng web thương mại điện tử (ecommerce) sử dụng Amazon RDS for MySQL. Nhóm marketing phát hiện có các cập nhật bất ngờ vào thông tin sản phẩm và giá cả trên website, dẫn đến ảnh hưởng mục tiêu doanh số. Họ yêu cầu database specialist thực hiện audit (kiểm toán) hoạt động cơ sở dữ liệu trong tương lai để xác định ai (how) và khi nào (when) các thay đổi được thực hiện.
Yêu cầu chính: Chọn HAI giải pháp phù hợp nhất để audit hoạt động DB, tập trung vào việc theo dõi thay đổi dữ liệu (như UPDATE giá cả, sản phẩm).
🛠️ Ngữ cảnh AWS: Với RDS MySQL, auditing được hỗ trợ qua Advanced Auditing (từ MySQL 5.6+), ghi log các sự kiện như kết nối (CONNECT) và truy vấn thay đổi dữ liệu (QUERY_DML: INSERT/UPDATE/DELETE). Logs cần được publish để dễ dàng phân tích. (Cập nhật đến 2026: AWS tiếp tục hỗ trợ Parameter Group cho auditing và tích hợp CloudWatch Logs Insights cho query log hiệu quả).
✅ Đáp án đúng (Chọn TWO)
- Enable auditing of CONNECT and QUERY_DML events.
- Publish the database logs to Amazon CloudWatch Logs.
Lý do lựa chọn:
Hai giải pháp này trực tiếp đáp ứng yêu cầu audit thay đổi dữ liệu trong tương lai.
- Enable auditing: Bật audit cho CONNECT (theo dõi ai kết nối) và QUERY_DML (theo dõi truy vấn thay đổi dữ liệu như UPDATE giá/sản phẩm), giúp ghi nhận chi tiết "how and when".
- Publish to CloudWatch Logs: Gửi log audit đến CloudWatch để lưu trữ, tìm kiếm, và phân tích dễ dàng (sử dụng Logs Insights), thay vì chỉ lưu trên DB instance.
🛠️ Cách triển khai: Sử dụng Parameter Group (db-mysql-advanced-audit parameter) để bậtserver_audit_events='CONNECT,QUERY_DML', rồi publish log qua Modification RDS hoặc CLI:aws rds modify-db-parameter-group.
📘 Nguồn tham khảo: - AWS RDS MySQL Advanced Auditing
- Publishing MySQL Logs to CloudWatch
- CloudWatch Logs Insights for RDS (cập nhật 2024-2026).
🔍 Phân tích chi tiết tất cả các phương án
Dưới đây là giải thích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh, đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm lý do bằng tiếng Việt:
-
Create an RDS event subscription to the audit event type.
❌ Sai: RDS Event Subscriptions chỉ theo dõi sự kiện hệ thống như backup, failover, maintenance (event categories: administration, availability,...), không phải audit logs chi tiết về truy vấn người dùng. Không giúp xác định thay đổi dữ liệu cụ thể. -
Enable auditing of CONNECT and QUERY_DML events.
✅ Đúng: Bật auditing cho CONNECT (kết nối user) và QUERY_DML (truy vấn DML: INSERT/UPDATE/DELETE) chính xác ghi log thay đổi sản phẩm/giá, bao gồm timestamp và user. Đây là bước đầu tiên cần thiết cho audit MySQL trên RDS. -
SSH to the DB instance and review the database logs.
❌ Sai: RDS là managed service, không hỗ trợ SSH trực tiếp vào DB instance (multi-AZ, security group chặn). Logs chỉ truy cập qua AWS console/CLI/API, không thể SSH thủ công. -
Publish the database logs to Amazon CloudWatch Logs.
✅ Đúng: Sau khi bật auditing, publish audit/general/slow/error logs đến CloudWatch Logs để tập trung hóa, tìm kiếm, và alert (ví dụ: query Logs Insights với filter "UPDATE price"). Giúp marketing dễ dàng audit "when/how" thay đổi. -
Enable Enhanced Monitoring on the DB instance.
❌ Sai: Enhanced Monitoring cung cấp metrics OS/host level (CPU, memory, processlist) từ CloudWatch Agent, không ghi log truy vấn cụ thể hay audit DML. Chỉ hữu ích cho performance, không phải security audit.
🧩 Tóm tắt lợi ích combo đúng: Enable auditing + Publish logs → Full audit trail có thể query realtime, alert qua CloudWatch Alarms nếu phát hiện UPDATE bất thường. Khuyến nghị thêm: Sử dụng IAM policies để kiểm soát log access và KMS encrypt logs.
Which solution meets these requirements?
- A Amazon RDS for MySQL with multi-Region read replicas
- B Amazon Aurora global database
- C Amazon RDS for Oracle with GoldenGate
- D Amazon DynamoDB global tables
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một công ty game lớn đang xây dựng giải pháp tập trung để lưu trữ trạng thái phiên người chơi (player session state) cho nhiều game online. Các yêu cầu chính bao gồm:
- Key-value storage (lưu trữ dạng khóa-giá trị) với độ trễ thấp (low latency).
- Tỷ lệ đọc/ghi cân bằng (equal mix of reads and writes).
- Dữ liệu được ghi vào AWS Region gần người dùng nhất (closest to the user) trong hệ thống người dùng phân bố địa lý toàn cầu.
- Kiến trúc giảm thiểu overhead quản lý replication giữa các Region (minimize overhead for data replication).
📌 Mục tiêu cốt lõi: Cần một dịch vụ quản lý tự động, hỗ trợ multi-Region writes (ghi ở nhiều Region), replication tự động với độ trễ thấp, phù hợp key-value và workload cân bằng đọc/ghi. Không nên dùng RDBMS truyền thống vì overhead cao và không tối ưu cho key-value.
✅ Đáp án đúng: Amazon DynamoDB global tables
Lý do lựa chọn:
- DynamoDB là dịch vụ NoSQL key-value gốc, hỗ trợ low latency (microsecond reads/writes) với DynamoDB Accelerator (DAX) nếu cần cache.
- Global Tables cho phép multi-master replication: Dữ liệu được ghi vào table ở Region gần user nhất, tự động replicate đồng bộ (eventual consistency mặc định, strong consistency tùy chọn) sang các Region khác mà không cần quản lý thủ công.
- Giảm thiểu overhead: AWS tự động xử lý replication, failover, và scaling. Hỗ trợ workload 50/50 reads/writes hoàn hảo.
- Cập nhật 2026: Global Tables v2 (từ 2020+) cải thiện throughput cao hơn, hỗ trợ on-demand capacity, và tích hợp Point-in-Time Recovery (PITR) multi-Region.
- ✅ Hoàn hảo khớp yêu cầu: Key-value, multi-Region writes tự động, low overhead.
🔍 Phân tích chi tiết từng phương án
-
Amazon RDS for MySQL with multi-Region read replicas
❌ Sai: RDS MySQL chỉ hỗ trợ read replicas async giữa Regions, không cho phép writes từ replicas (chỉ primary Region ghi được). Overhead cao vì phải quản lý failover thủ công và routing writes. Không phải key-value thuần, độ trễ replication cao (giây), không phù hợp mix reads/writes cân bằng hoặc writes gần user. -
Amazon Aurora global database
❌ Sai: Aurora Global hỗ trợ multi-Region với primary cluster ở một Region (writes chỉ primary) và secondary clusters cho reads. Writes không thể ở Region gần user dễ dàng (phải route về primary). Overhead quản lý promotion/failover. Aurora là RDBMS, không tối ưu key-value/low-latency như NoSQL. Cập nhật 2026: Vẫn giữ model primary-secondary, không multi-master writes. -
Amazon RDS for Oracle with GoldenGate
❌ Sai: GoldenGate là công cụ third-party replication phức tạp, yêu cầu cấu hình thủ công cao (extract, pump, apply processes). Overhead lớn: Quản lý license Oracle, monitoring replication lag, và scaling. Không tự động, độ trễ cao, không phải key-value native. Không khuyến nghị cho low-overhead multi-Region.
📘 Tài liệu tham khảo (AWS Docs cập nhật 2026)
- DynamoDB Global Tables: AWS Documentation - Global Tables – Chi tiết multi-master, replication tự động.
- Aurora Global Database: AWS Documentation - Global Databases – Giới hạn writes primary.
- RDS Cross-Region Replication: AWS Documentation - RDS Read Replicas.
- RDS GoldenGate: AWS Documentation - Oracle GoldenGate – Overhead cao.
- Best Practices Gaming Workloads: AWS Well-Architected Gaming Lens – Khuyến nghị DynamoDB cho session state.
🛠️ Kết luận: DynamoDB Global Tables là lựa chọn tối ưu nhất cho workload game real-time, scalable toàn cầu! Nếu cần tùy chỉnh, kết hợp với AWS Global Accelerator cho routing traffic.
Which MySQL database option would meet these requirements?
- A Amazon RDS for MySQL with Multi-AZ
- B Amazon Aurora Serverless MySQL cluster
- C Amazon Aurora MySQL cluster
- D Amazon RDS for MySQL with read replica
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một ứng dụng on-premises với ba tầng chính: web tier (lớp web), application tier (lớp ứng dụng) và MySQL database tier (lớp cơ sở dữ liệu MySQL). Cơ sở dữ liệu chủ yếu được sử dụng trong giờ làm việc, kèm theo các đỉnh tải ngẫu nhiên trong ngày. Chuyên gia cơ sở dữ liệu cần cải thiện tính sẵn sàng (availability) và giảm chi phí cho lớp MySQL khi di chuyển lên AWS.
🛠️ Yêu cầu chính: Giải pháp MySQL phải hỗ trợ tính sẵn sàng cao (high availability - HA), tự động scale theo tải biến động (peaks ngẫu nhiên), và tối ưu chi phí (chỉ trả tiền khi sử dụng, scale down khi idle). Đây là kịch bản điển hình cho workload không liên tục, không cần provisioned capacity cố định.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Amazon Aurora Serverless MySQL cluster
🧩 Lý do: Aurora Serverless (phiên bản v2 cập nhật đến 2026) là giải pháp MySQL serverless hoàn toàn, tự động scale từ 0.5 ACU lên hàng nghìn ACU dựa trên tải thực tế. Nó pause tự động khi idle (phù hợp giờ làm việc), xử lý peaks ngẫu nhiên mà không cần quản lý instance. Availability cao nhờ cluster với replicas tự động failover (RTO <60s). Giảm chi phí đáng kể vì pay-per-use (không tính phí khi pause), tiết kiệm 50-90% so với provisioned RDS/Aurora cho workload biến động. Hoàn hảo cho migration từ on-premises MySQL.
📋 Giải thích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên yêu cầu availability cao + giảm cost cho workload giờ làm + peaks ngẫu nhiên:
-
Amazon RDS for MySQL with Multi-AZ
❌ Sai: Multi-AZ cung cấp HA qua standby replica (failover tự động), nhưng là provisioned instance cố định, luôn chạy 24/7 → chi phí cao (double cost cho primary + standby). Không scale tự động theo peaks, không pause khi idle → không tối ưu cost cho giờ làm việc. -
Amazon Aurora Serverless MySQL cluster
✅ Đúng: Như đã giải thích ở trên, serverless tự động scale/pause, HA với cluster replicas, pay-per-use → cân bằng hoàn hảo availability và cost cho tải biến động. -
Amazon Aurora MySQL cluster
❌ Sai: Aurora MySQL provisioned cluster có perf cao + HA (3 replicas, failover nhanh), nhưng luôn chạy full capacity → chi phí cao tương tự RDS Multi-AZ. Không serverless, không pause → không giảm cost hiệu quả cho workload không liên tục. -
Amazon RDS for MySQL with read replica
❌ Sai: Read replica chỉ scale read traffic (offload queries), không cải thiện write availability (không failover tự động cho writes). Vẫn provisioned, chạy 24/7 → chi phí cao, không xử lý peaks writes ngẫu nhiên hoặc idle tốt.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS RDS/Aurora Docs: Amazon Aurora Serverless v2 – Chi tiết scale/pause/pay-per-use.
- RDS Multi-AZ/Read Replicas: High Availability.
- Aurora Cluster: Aurora Clusters.
- Best Practices Migration: AWS Well-Architected Framework - Reliability Pillar (2024 update).
🛠️ Lời khuyên: Trong migration thực tế, dùng DMS (Database Migration Service) để chuyển MySQL on-premises sang Aurora Serverless, kết hợp CloudWatch alarms cho monitoring peaks.
Schema Conversion Tool (AWS SCT) provides options for running this workload on Amazon RDS for SQL Server Enterprise Edition, Amazon RDS for SQL Server
Standard Edition, Amazon Aurora MySQL, and Amazon Aurora PostgreSQL. The company does not want to use its own SQL server license and does not want to change from Microsoft SQL Server.
What is the MOST cost-effective and operationally efficient solution?
- A Run SQL Server Enterprise Edition on Amazon EC2.
- B Run SQL Server Standard Edition on Amazon RDS.
- C Run SQL Server Enterprise Edition on Amazon RDS.
- D Run Amazon Aurora MySQL leveraging SQL Server on Linux compatibility libraries.
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 migrate cơ sở dữ liệu Microsoft SQL Server Enterprise Edition từ on-premises sang AWS, với các ràng buộc quan trọng:
- AWS Schema Conversion Tool (AWS SCT) đã phân tích và gợi ý các tùy chọn khả thi: Amazon RDS for SQL Server Enterprise Edition, Amazon RDS for SQL Server Standard Edition, Amazon Aurora MySQL, và Amazon Aurora PostgreSQL. Điều này cho thấy workload có thể chạy trên các engine này mà không cần thay đổi schema lớn.
- Công ty không muốn sử dụng license SQL Server riêng (tức là ưu tiên mô hình License Included - trả phí theo giờ sử dụng, không dùng BYOL - Bring Your Own License).
- Không muốn thay đổi khỏi Microsoft SQL Server (loại bỏ các engine khác như MySQL hay PostgreSQL).
- Yêu cầu giải pháp MOST cost-effective (tiết kiệm chi phí nhất) và operationally efficient (hiệu quả vận hành cao nhất, tức managed service để giảm công quản lý).
📘 Kiến thức AWS cập nhật đến 2026: Theo tài liệu AWS RDS mới nhất (AWS RDS for SQL Server User Guide, cập nhật 2025-2026), RDS hỗ trợ SQL Server Enterprise (EE) và Standard (SE) với License Included. SE rẻ hơn EE khoảng 40-50% tùy instance size (ví dụ: db.m6g.4xlarge SE ~$1.5/giờ, EE ~$2.5/giờ ở us-east-1). SCT xác nhận tính tương thích, nên downgrade từ EE sang SE là khả thi nếu workload không cần tính năng EE độc quyền (như advanced partitioning).
Nguồn tham khảo:
- AWS Documentation: Amazon RDS for SQL Server Pricing (License Included so sánh EE vs SE).
- AWS SCT Best Practices (tương thích schema SQL Server).
- AWS Well-Architected Framework: Database Lens (Operational Excellence pillar khuyến nghị RDS managed).
✅ Đáp án đúng: Run SQL Server Standard Edition on Amazon RDS
Lý do lựa chọn:
- 🛡️ Giữ nguyên SQL Server: Không đổi engine, phù hợp yêu cầu.
- 💰 Cost-effective nhất: License Included trên RDS SE rẻ hơn EE (không cần BYOL), SCT xác nhận tương thích workload.
- ⚙️ Operationally efficient: RDS tự động backup, patching, scaling, multi-AZ, giảm tải DevOps so với EC2.
- So với các option khác, đây cân bằng hoàn hảo giữa chi phí thấp và managed service.
📋 Giải thích tất cả các phương án (đúng/sai)
-
Run SQL Server Enterprise Edition on Amazon EC2.
❌ Sai: EC2 yêu cầu tự quản lý OS, patching, backup (kém efficient). License Included không khả dụng trực tiếp (phải BYOL hoặc Marketplace AMI trả phí cao hơn), vi phạm "không dùng license riêng". Chi phí vận hành cao hơn RDS (không managed). Không phải lựa chọn tối ưu theo SCT. -
Run SQL Server Standard Edition on Amazon RDS.
✅ Đúng: Như giải thích trên, SCT hỗ trợ, License Included rẻ nhất cho SQL Server, RDS managed đầy đủ (High Availability, Performance Insights). Hoàn hảo cho migrate không thay đổi engine. -
Run SQL Server Enterprise Edition on Amazon RDS.
❌ Sai: RDS EE hỗ trợ License Included và tương thích SCT, nhưng đắt hơn SE đáng kể (không cost-effective). Nếu workload chạy tốt trên SE, không cần EE (advanced features như NUMA không bắt buộc). -
Run Amazon Aurora MySQL leveraging SQL Server on Linux compatibility libraries.
❌ Sai: Vi phạm "không đổi khỏi SQL Server" (chuyển sang MySQL). "SQL Server on Linux compatibility libraries" không phải tính năng chính thức AWS (chỉ là giả định không chuẩn). Aurora MySQL nhanh/tiết kiệm hơn nhưng yêu cầu schema conversion lớn, không efficient cho migrate trực tiếp.
🧠 Kết luận: Lựa chọn B là optimal theo AWS best practices cho database migration (Database Migration Service + SCT). Nếu workload cần EE-specific features, kiểm tra lại SCT report trước implement! 🚀
To meet a new requirement, the company also wants the ability to query the table by using a third attribute named Invoice ID. Queries using the Invoice ID must be strongly consistent. A database specialist must provide this capability with optimal performance and minimal overhead.
What should the database administrator do to meet these requirements?
- A Add a global secondary index on Invoice ID to the existing table.
- B Add a local secondary index on Invoice ID to the existing table.
- C Recreate the table by using the latest snapshot while adding a local secondary index on Invoice ID.
- D Use the partition key and a FilterExpression parameter with a filter on Invoice ID for all queries.
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 DynamoDB, một dịch vụ cơ sở dữ liệu NoSQL được quản lý hoàn toàn bởi AWS. 🌐
- Công ty có website thương mại điện tử sử dụng bảng DynamoDB để lưu trữ purchase orders (đơn hàng mua). Mỗi đơn hàng bao gồm Customer ID (ID khách hàng) làm partition key (khóa phân vùng chính) và Order ID (ID đơn hàng) làm sort key (khóa sắp xếp).
- Yêu cầu mới: Cần khả năng query (truy vấn) bảng theo thuộc tính thứ ba là Invoice ID (ID hóa đơn), với strongly consistent reads (đọc nhất quán mạnh - đảm bảo dữ liệu mới nhất, không bị delay).
- Mục tiêu: Database specialist phải cung cấp giải pháp với hiệu suất tối ưu (optimal performance) và overhead tối thiểu (minimal overhead - ít tài nguyên, chi phí thấp).
🛠️ Thách thức chính: DynamoDB không hỗ trợ secondary index linh hoạt như RDBMS; cần chọn loại index phù hợp để query nhanh mà không scan toàn bộ bảng, đồng thời đảm bảo strongly consistent.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Recreate the table by using the latest snapshot while adding a local secondary index on Invoice ID.
Lý do chi tiết (dựa trên kiến thức DynamoDB cập nhật đến 2026):
- Local Secondary Index (LSI) chia sẻ partition key (Customer ID) với bảng gốc, chỉ thay đổi sort key (có thể dùng Invoice ID làm sort key mới). LSI hỗ trợ strongly consistent reads (như bảng gốc), hiệu suất cao vì query chỉ scan trong cùng partition.
- LSI chỉ tạo được lúc tạo bảng (create table), không add sau (khác GSI). Do đó, cần recreate table từ latest snapshot (ảnh chụp mới nhất) để giữ dữ liệu, tránh mất mát, và thêm LSI ngay lúc tạo.
- Optimal & minimal overhead: Không tốn RCU/WCU thêm (chia sẻ capacity với bảng gốc), query nhanh O(log N) trong partition, strongly consistent. 📈
Đây là giải pháp chuẩn theo best practices AWS cho trường hợp cần strongly consistent trên sort key thứ cấp.
📋 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 lý do đúng/sai bằng tiếng Việt rõ ràng:
-
Add a global secondary index on Invoice ID to the existing table.
❌ Sai. Global Secondary Index (GSI) có partition key riêng (Invoice ID), có thể add sau khi tạo bảng. Tuy nhiên, GSI chỉ hỗ trợ eventually consistent reads (không strongly consistent, dữ liệu có thể delay ~1 giây). Không đáp ứng yêu cầu strongly consistent, dù hiệu suất tốt nhưng overhead cao hơn (tốn RCU riêng, chi phí gấp đôi reads). -
Add a local secondary index on Invoice ID to the existing table.
❌ Sai. LSI lý tưởng vì strongly consistent và chia sẻ capacity. Nhưng không thể add LSI sau khi tạo bảng (DynamoDB quy định cứng). Thử add sẽ lỗi, không khả thi mà không recreate table. -
Recreate the table by using the latest snapshot while adding a local secondary index on Invoice ID.
✅ Đúng. Như giải thích trên: Sử dụng Point-in-Time Recovery (PITR) snapshot mới nhất để restore dữ liệu, recreate table và thêm LSI trên Invoice ID (sort key mới). Đảm bảo zero data loss, strongly consistent, performance cao, overhead thấp (không cần export/import thủ công). -
Use the partition key and a FilterExpression parameter with a filter on Invoice ID for all queries.
❌ Sai. Cách này dùng Query với partition key + FilterExpression (lọc Invoice ID sau). Tuy strongly consistent nhưng không optimal: Phải đọc toàn bộ partition trước khi filter (có thể tốn RCU lớn nếu partition lớn), không index thực sự, dễ throttle. Không phải giải pháp "minimal overhead".
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- AWS DynamoDB Developer Guide: Secondary indexes - Chi tiết LSI/GSI, strongly consistent chỉ base/LSI.
- Best Practices: Using Global Secondary Indexes in DynamoDB - Xác nhận GSI eventually consistent.
- PITR & Snapshots: Point-in-Time Recovery - Hỗ trợ recreate từ snapshot.
- Exam Topic DOP-C02: Secondary indexes là core trong DevOps Engineer Professional.
Giải pháp này đảm bảo scalability và compliance AWS Well-Architected Framework! 🚀