Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
What should the database specialist do to meet these requirements?
- A Use the dynamodb:ReturnValues condition key in the external application's IAM policy to grant access.
- B Use a projection expression to select specific users from the DynamoDB table for the external application.
- C Use the ExecuteStatementAPI operation to select specific users from the DynamoDB table for the external application.
- D Use the dynamodb:LeadingKeys condition key in the external application's IAM policy to grant access.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh việc thiết kế quyền truy cập IAM cho DynamoDB 📘. Một công ty sử dụng bảng DynamoDB để lưu trữ dữ liệu khách hàng, với partition key là user ID (khóa phân vùng chính) và nhiều non-key attributes khác. Một ứng dụng bên ngoài (external application) cần truy cập dữ liệu chỉ cho các user ID cụ thể, nghĩa là chỉ cho phép đọc/ghi các item có partition key values khớp chính xác hoặc theo prefix cụ thể.
Mục tiêu chính: Hạn chế quyền truy cập ở mức partition key mà không cho phép ứng dụng đọc toàn bộ bảng, đảm bảo tuân thủ nguyên tắc least privilege trong IAM. Điều này rất quan trọng trong DynamoDB vì dữ liệu được phân vùng theo partition key, và IAM policies có các condition keys chuyên biệt để kiểm soát truy cập fine-grained 🛡️.
Yêu cầu kỹ thuật cập nhật (đến 2026): Sử dụng IAM policies với condition keys của DynamoDB (theo AWS IAM User Guide for DynamoDB, phiên bản mới nhất hỗ trợ fine-grained access control mà không cần DAX hoặc Global Tables thay đổi cơ bản).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use the dynamodb:LeadingKeys condition key in the external application's IAM policy to grant access.
Lý do:
dynamodb:LeadingKeyslà condition key chuyên dụng của DynamoDB IAM để kiểm soát truy cập dựa trên phần đầu (prefix) của partition key 🗝️.- Nó cho phép chỉ định danh sách các giá trị prefix cụ thể (ví dụ:
["user123", "user456"]), đảm bảo ứng dụng chỉ truy cập được items có partition key bắt đầu bằng các giá trị đó. - Hoàn hảo cho yêu cầu "access only to items with specific partition key values" vì DynamoDB hỗ trợ exact match hoặc prefix matching qua key này.
- Không ảnh hưởng đến performance, và là best practice theo AWS Well-Architected Framework (Security Pillar) 🚀.
📋 Phân tích tất cả các phương án (đúng/sai)
-
[SAI] Use the dynamodb:ReturnValues condition key in the external application's IAM policy to grant access.
❌ Sai vì:dynamodb:ReturnValueschỉ kiểm soát giá trị trả về trong các operation như UpdateItem/DeleteItem (ví dụ: return NONE, ALL_OLD, UPDATED_OLD), không liên quan đến việc filter hoặc restrict partition key. Sử dụng nó sẽ không hạn chế truy cập theo user ID, dẫn đến rủi ro bảo mật cao. -
[SAI] Use a projection expression to select specific users from the DynamoDB table for the external application.
❌ Sai vì: Projection expression chỉ dùng để chọn specific attributes (cột) trong Query/Scan, không filter theo partition key. Ứng dụng vẫn cần quyền đọc toàn bảng, không enforce "access only to specific partition keys" tại IAM level. Đây là client-side filter, dễ bypass và không an toàn 🕳️. -
[SAI] Use the ExecuteStatementAPI operation to select specific users from the DynamoDB table for the external application.
❌ Sai vì:ExecuteStatementlà PartiQL API cho truy vấn SQL-like (như SELECT WHERE), nhưng nó chỉ là operation thực thi, không grant access control. Ứng dụng vẫn cần IAM policy rộng rãi để gọi API này trên toàn bảng, không restrict specific keys. PartiQL hữu ích cho complex queries nhưng không thay thế IAM conditions (cập nhật 2026 vẫn vậy). -
[ĐÚNG] Use the dynamodb:LeadingKeys condition key in the external application's IAM policy to grant access.
✅ Đúng như đã giải thích ở trên. Đây là cách fine-grained access control chuẩn cho partition keys trong DynamoDB IAM policies.
📚 Tài liệu tham khảo (AWS chính thức, cập nhật 2026)
- IAM Policy Elements for DynamoDB: docs.aws.amazon.com/amazondynamodb/latest/developerguide/usingwithiam.id.html – Chi tiết về
dynamodb:LeadingKeys. - DynamoDB Fine-Grained Access Control: docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html#FineGrainedAccessControl – Best practices.
- AWS Well-Architected Framework (Security): aws.amazon.com/architecture/well-architected – Nhấn mạnh least privilege.
Lời khuyên DevOps 💡: Luôn test IAM policies với aws iam simulator trước khi deploy, và kết hợp với CloudTrail để audit access logs! 🛡️
Which solution will resolve this issue with the LEAST development effort?
- A Use DynamoDB Accelerator (DAX)
- B Use Amazon CloudFront in front of DynamoDB
- C Create a DynamoDB table with a local secondary index (LSI)
- D Use Amazon ElastiCache in front of DynamoDB
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một tình huống thực tế trong ứng dụng dự báo thời tiết của một thành phố, sử dụng Amazon DynamoDB làm lớp dữ liệu chính. Phần analysis component cần thực hiện đọc lặp lại (repeated reads) trên một dataset lớn, dẫn đến tình trạng tiêu thụ hết toàn bộ read capacity của bảng DynamoDB. Điều này gây ảnh hưởng tiêu cực đến các ứng dụng khác cùng truy cập dữ liệu.
📌 Vấn đề cốt lõi: Read capacity units (RCU) bị quá tải tạm thời do các truy vấn đọc lặp lại, cần giải pháp giảm tải read cho bảng DynamoDB mà với ÍT NỖ LỰC PHÁT TRIỂN NHẤT (LEAST development effort). Giải pháp phải nhanh chóng, dễ triển khai, không yêu cầu thay đổi lớn code hoặc kiến trúc ứng dụng.
🛠️ Bối cảnh AWS cập nhật đến 2026: DynamoDB hỗ trợ on-demand capacity và provisioned mode, nhưng caching là cách hiệu quả nhất để xử lý repeated reads mà không tăng RCU. DAX (DynamoDB Accelerator) là dịch vụ managed cache chính thức cho DynamoDB, giảm latency reads lên đến 10x và offload 100% reads nếu hit cache.
📘 Tài liệu tham khảo:
- AWS DynamoDB Developer Guide: DAX Overview (cập nhật 2024-2026).
- AWS Well-Architected Framework - Reliability Pillar: Khuyến nghị DAX cho read-heavy workloads.
✅ Đáp án đúng: Use DynamoDB Accelerator (DAX)
Lý do lựa chọn:
- DAX là dịch vụ cache in-memory hoàn toàn managed dành riêng cho DynamoDB, tự động cache kết quả các truy vấn đọc lặp lại (get/scan/query), giảm tải RCU xuống gần 0% cho repeated reads.
- Least development effort: Chỉ cần thay đổi endpoint từ DynamoDB sang DAX cluster (SDK tự động hỗ trợ), không cần viết logic cache thủ công, invalidate, hay TTL. Triển khai chỉ mất vài phút qua Console/CLI/Terraform.
- Hoàn hảo cho workload analysis với dataset lớn, latency <2ms (microseconds cho hit cache), và tích hợp seamless với IAM, VPC.
- So với các option khác, DAX zero-effort integration cho existing apps.
📋 Giải thích tất cả các phương án (đúng/sai)
-
✅ Use DynamoDB Accelerator (DAX):
Đúng vì: Đây là giải pháp tối ưu nhất cho vấn đề read-heavy trên DynamoDB. DAX hoạt động như một cluster cache phân tán (in-memory), tự động populate dữ liệu từ DynamoDB, hỗ trợ TTL và eviction tự động. Giảm chi phí RCU lên đến 100% cho repeated reads, không thay đổi code lớn. Lý tưởng cho ứng dụng thời tiết cần real-time analysis. ✅ Least effort: SDK DynamoDB (Java/Node/Python) chỉ cần config endpoint DAX. -
❌ Use Amazon CloudFront in front of DynamoDB:
Sai vì: CloudFront là CDN cho nội dung static/HTTP (web assets, API Gateway), không hỗ trợ DynamoDB native (DynamoDB là NoSQL database, không expose qua HTTP public). Phải build proxy layer phức tạp (API Gateway + Lambda), tăng effort cao, latency thêm, và không cache DynamoDB queries hiệu quả. Không giải quyết read capacity trực tiếp. -
❌ Create a DynamoDB table with a local secondary index (LSI):
Sai vì: LSI chỉ thay đổi access pattern bằng cách index partition key + sort key mới, giúp query nhanh hơn nhưng KHÔNG cache reads và KHÔNG giảm RCU tiêu thụ. Vẫn cần provision RCU cho reads lặp lại dataset lớn. Hơn nữa, LSI phải tạo tại thời điểm tạo table (không modify sau), yêu cầu recreate table → downtime và effort cao. -
❌ Use Amazon ElastiCache in front of DynamoDB:
Sai vì: ElastiCache (Redis/Memcached) là general-purpose cache, có thể dùng nhưng yêu cầu phát triển thêm logic: implement cache-aside (get from cache → miss thì DynamoDB → put cache), handle invalidation, TTL, và serialization keys. Effort cao hơn DAX (viết code custom, monitor hit ratio). DAX chuyên biệt cho DynamoDB, dễ hơn và rẻ hơn cho workload này.
🧩 Kết luận: Chọn DAX để resolve ngay lập tức với zero code change, phù hợp best practice AWS cho DynamoDB read-intensive apps! 🚀
What should a database specialist do to meet those requirements in the MOST secure manner?
- A Store the database credentials by using AWS Systems Manager Parameter Store. Enable automatic rotation of the password. Use the AWS Cloud Development Kit (AWS CDK) in the Lambda function to retrieve the credentials from Parameter Store
- B Encrypt the database credentials by using AWS Key Management Service (AWS KMS). Store the credentials in Amazon S3. Use an S3 Lifecycle policy to rotate the password. Retrieve the credentials by using Python code in Lambda
- C Store the database credentials by using AWS Secrets Manager. Enable automatic rotation of the password. Configure the Lambda function to use the Secrets Manager API to retrieve the credentials
- D Store the database credentials in an Amazon DynamoDB table. Assign an IAM role to the Lambda function to grant the Lambda function read-only access to the DynamoDB table. Rotate the password by using another Lambda function that runs monthly
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 xây dựng một ứng dụng serverless sử dụng nhiều dịch vụ AWS, với dữ liệu được lưu trữ trên Amazon RDS DB instance. Yêu cầu chính bao gồm:
- Lưu trữ credentials (tài khoản truy cập database) một cách an toàn nhất.
- Hàm AWS Lambda phải có thể truy cập credentials này.
- Tự động xoay (rotate) mật khẩu database hàng tháng bằng giải pháp tự động hóa. Mục tiêu là chọn giải pháp MOST secure (an toàn nhất), phù hợp với best practices AWS cho serverless architecture, tránh hardcode secrets và đảm bảo tuân thủ nguyên tắc least privilege. 🛡️
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Store the database credentials by using AWS Secrets Manager. Enable automatic rotation of the password. Configure the Lambda function to use the Secrets Manager API to retrieve the credentials.
Lý do:
- AWS Secrets Manager là dịch vụ chuyên dụng để quản lý, lưu trữ và rotate secrets (như DB credentials) một cách an toàn cao nhất, hỗ trợ mã hóa tự động bằng AWS KMS và tích hợp rotation tự động cho RDS (qua Lambda rotation function built-in).
- Bật automatic rotation hàng tháng dễ dàng qua console/API, không cần code custom.
- Lambda truy cập qua Secrets Manager API với IAM role (least privilege), tránh lưu secrets trực tiếp trong code hoặc env vars.
- Đây là best practice cập nhật 2026 cho serverless apps, giảm rủi ro exposure và tuân thủ compliance (SOC, PCI DSS). 🚀
📋 Giải thích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên nội dung gốc bằng tiếng Anh. Tôi đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm giải thích lý do bằng tiếng Việt:
-
Store the database credentials by using AWS Systems Manager Parameter Store. Enable automatic rotation of the password. Use the AWS Cloud Development Kit (AWS CDK) in the Lambda function to retrieve the credentials from Parameter Store
❌ Sai: Parameter Store hỗ trợ rotation cơ bản nhưng không chuyên sâu như Secrets Manager cho DB secrets (thiếu rotation lambda tích hợp cho RDS). Sử dụng CDK trong Lambda để retrieve là overkill và không standard, tăng complexity và rủi ro (CDK dùng cho infra, không phải runtime retrieval). Không phải "MOST secure" vì Parameter Store kém hơn Secrets Manager về auditing và encryption defaults. 🛑 -
Encrypt the database credentials by using AWS Key Management Service (AWS KMS). Store the credentials in Amazon S3. Use an S3 Lifecycle policy to rotate the password. Retrieve the credentials by using Python code in Lambda
❌ Sai: S3 không phải nơi lưu secrets (dễ public exposure nếu misconfig), Lifecycle policy chỉ quản lý storage (expire/delete), không rotate password tự động. Phải code Python custom để retrieve, tăng rủi ro hardcode logic và dependency. Không an toàn, vi phạm best practices AWS (dùng S3 cho objects, không secrets). 😤 -
Store the database credentials by using AWS Secrets Manager. Enable automatic rotation of the password. Configure the Lambda function to use the Secrets Manager API to retrieve the credentials
✅ Đúng: Như đã giải thích ở phần trên. Giải pháp tối ưu, secure nhất với rotation tự động cho RDS, API access ephemeral (tạm thời), IAM fine-grained control. Hỗ trợ serverless hoàn hảo, scale tự động. 🌟 -
Store the database credentials in an Amazon DynamoDB table. Assign an IAM role to the Lambda function to grant the Lambda function read-only access to the DynamoDB table. Rotate the password by using another Lambda function that runs monthly
❌ Sai: DynamoDB không dành cho secrets (dễ query exposure, thiếu encryption/rotation built-in). Rotation manual qua Lambda khác (chạy monthly via EventBridge) phức tạp, dễ lỗi, không tự động real-time. IAM read-only vẫn rủi ro nếu table bị truy cập rộng. Không secure bằng Secrets Manager. 🔒❌
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS Secrets Manager Documentation: Managing Amazon RDS database credentials – Hướng dẫn rotation tự động cho RDS.
- AWS Well-Architected Framework (Serverless Lens): Security Pillar – Khuyến nghị Secrets Manager cho Lambda secrets.
- AWS Best Practices: Parameter Store vs. Secrets Manager – So sánh rõ ràng ưu tiên Secrets Manager.
- RDS Rotation: Enable rotation with a Lambda function (tích hợp Secrets Manager).
Giải pháp này đảm bảo zero-trust security và dễ maintain! Nếu cần demo code hoặc deep dive, hỏi thêm nhé. 💡
What should the database specialist do to identify the optimal migration method?
- A Use the AWS Schema Conversion Tool (AWS SCT) database migration assessment report
- B Use the AWS Schema Conversion Tool (AWS SCT) multiserver assessor.
- C Use an AWS DMS pre-migration assessment
- D Use the AWS DMS data validation tool
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 quy trình di chuyển cơ sở dữ liệu (database migration) từ Oracle on-premises sang Amazon RDS for PostgreSQL bằng công cụ AWS Database Migration Service (AWS DMS). Vai trò của database specialist là đánh giá (evaluate) các thiết lập nhiệm vụ di chuyển (migration task settings) và chuyển đổi kiểu dữ liệu (data type conversion) trong một task DMS. Mục tiêu là xác định phương pháp di chuyển tối ưu (optimal migration method).
🛠️ Bối cảnh chính:
- AWS DMS hỗ trợ di chuyển dữ liệu liên tục (full load + CDC), nhưng cần đánh giá trước để tránh lỗi về schema, data types (ví dụ: Oracle NUMBER sang PostgreSQL NUMERIC), transformations, và performance.
- Không phải chỉ convert schema (như SCT làm), mà cụ thể cho DMS task settings và data type conversion trong DMS (DMS có rules riêng để map data types).
- Kiến thức cập nhật đến 2026: AWS DMS Pre-Migration Assessment (PMA) là tính năng mới nhất (ra mắt ~2022, cải tiến liên tục), giúp tự động phân tích và recommend settings cho DMS tasks mà không cần chạy migration thực tế.
✅ Đáp án đúng: Use an AWS DMS pre-migration assessment
Lý do lựa chọn:
- AWS DMS Pre-Migration Assessment (PMA) là công cụ chuyên biệt để đánh giá trước migration cho DMS tasks. Nó phân tích source endpoint (Oracle), target (PostgreSQL), data types, transformations, LOB handling, và recommend optimal settings như task type (full load/migration), table mappings, error handling.
- PMA tạo báo cáo chi tiết về compatibility issues, data type conversions (ví dụ: Oracle CLOB → PostgreSQL TEXT với giới hạn), và gợi ý fixes để chọn optimal method (homogeneous/heterogeneous migration).
- Phù hợp nhất vì trực tiếp target DMS tasks, không cần schema conversion riêng (SCT dùng cho bước trước nếu cần).
📋 Giải thích tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh:
-
Use the AWS Schema Conversion Tool (AWS SCT) database migration assessment report ❌
Sai vì: AWS SCT chủ yếu dùng để convert và assess schema (DDL) từ Oracle sang PostgreSQL, tạo báo cáo về stored procedures, views, functions. Nó không đánh giá DMS task settings cụ thể như data transformations, table mappings, hoặc runtime behaviors của DMS. PMA của DMS mới chính xác cho DMS-specific issues. -
Use the AWS Schema Conversion Tool (AWS SCT) multiserver assessor ❌
Sai vì: Multiserver assessor của SCT dùng để đánh giá nhiều database cùng lúc về schema complexity và migration feasibility trên quy mô lớn. Nó không tập trung vào data type conversion trong DMS tasks hay settings cụ thể của DMS, mà chỉ là high-level assessment cho SCT conversions. -
Use an AWS DMS pre-migration assessment ✅
Đúng vì: Như đã giải thích ở trên, đây là lựa chọn tối ưu. PMA chạy trên DMS fleet, phân tích metadata/source data mẫu, detect issues như data type mismatches (Oracle VARCHAR2 → PostgreSQL VARCHAR), và suggest optimal migration method (ví dụ: dùng extra connection attributes cho PostgreSQL). -
Use the AWS DMS data validation tool ❌
Sai vì: DMS Data Validation Tool dùng sau migration để so sánh data giữa source/target (row count, checksum, sampling). Nó không đánh giá pre-migration settings hay data type conversion trước khi chạy task, nên không giúp identify optimal method từ đầu.
📘 Tài liệu tham khảo (cập nhật 2026)
- AWS DMS Documentation: Pre-Migration Assessments for AWS DMS – Chi tiết PMA features.
- AWS SCT vs DMS Best Practices: Database Migration Guide – So sánh SCT (schema) và DMS (data/tasks).
- RDS PostgreSQL Migration: Heterogeneous Migration Guide.
- Exam Prep DOP-C02: AWS Certified DevOps Engineer Professional blueprint nhấn mạnh DMS PMA cho task optimization (phiên bản 2024+).
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ụ thực hành, hãy hỏi nhé!
What architectural conditions should a database specialist set? (Choose two.)
- A Ensure that the automatic backups are turned on for the RDS DB instance
- B Ensure the backup retention value is set to 0 for the RDSDB instance
- C Ensure the RDS DB instance is set to Multi-AZ
- D Ensure the RDS DB instance is set to Single-AZ
- E Ensure the RDS DB instance is in a stopped state to turn on the read replica
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 Amazon RDS for SQL Server 2017 Enterprise edition, nơi một công ty thương mại điện tử đang chạy ứng dụng và gặp tình trạng tăng lưu lượng đọc (read volume). Đội ngũ ứng dụng muốn offload read transactions bằng cách thêm read replica vào DB instance RDS SQL Server.
Yêu cầu chính: Database specialist cần thiết lập architectural conditions (điều kiện kiến trúc) nào? Chọn hai lựa chọn.
📘 Bối cảnh AWS: Read replica giúp phân tải đọc từ primary DB, sao chép dữ liệu asynchronously. Tuy nhiên, với SQL Server, có các yêu cầu đặc biệt so với các engine khác (như MySQL/PostgreSQL), dựa trên tài liệu AWS cập nhật đến 2026: source DB phải đáp ứng điều kiện cụ thể để tạo replica thành công.
✅ Đáp án đúng (Chọn 2)
-
Ensure that the automatic backups are turned on for the RDS DB instance
🛠️ Lý do: Để tạo read replica, RDS yêu cầu automatic backups phải được bật trên source DB instance. Điều này sử dụng snapshot từ backup để khởi tạo replica, đảm bảo tính nhất quán dữ liệu. Nếu tắt, không thể tạo replica (lỗi "Automated backups must be enabled"). -
Ensure the RDS DB instance is set to Multi-AZ
🛠️ Lý do: Với RDS for SQL Server, read replica chỉ hỗ trợ khi source DB instance được cấu hình Multi-AZ. Multi-AZ cung cấp standby replica cho high availability, và SQL Server sử dụng cơ chế này để enable read replicas (khác với các engine khác không yêu cầu). Nếu Single-AZ, tính năng bị vô hiệu hóa.
📋 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) hoặc ❌ (sai), kèm giải thích đầy đủ dựa trên docs AWS RDS mới nhất (2026).
-
Ensure that the automatic backups are turned on for the RDS DB instance
✅ Đúng: Automatic backups là yêu cầu bắt buộc cho mọi read replica trên RDS (bao gồm SQL Server). Backup retention phải >=1 ngày để tạo point-in-time snapshot khởi tạo replica. Không bật → không tạo được replica.
🛠️ Lưu ý: Có thể kiểm tra qua Console/CLI:aws rds describe-db-instances --db-instance-identifier <id>. -
Ensure the backup retention value is set to 0 for the RDSDB instance
❌ Sai: Retention = 0 tắt hoàn toàn automatic backups, làm replica không thể tạo (vì không có snapshot). Yêu cầu tối thiểu là 1 ngày; khuyến nghị 7 ngày cho production. -
Ensure the RDS DB instance is set to Multi-AZ
✅ Đúng: Đặc thù SQL Server: Read replicas chỉ available khi source là Multi-AZ deployment. AWS sử dụng standby instance trong Multi-AZ để replicate data hiệu quả. Single-AZ không hỗ trợ (xem hạn chế engine-specific). -
Ensure the RDS DB instance is set to Single-AZ
❌ Sai: Single-AZ không hỗ trợ read replicas cho SQL Server. Phải chuyển sang Multi-AZ trước khi tạo (downtime ngắn nếu modify). Multi-AZ tăng HA nhưng tốn phí gấp đôi. -
Ensure the RDS DB instance is in a stopped state to turn on the read replica
❌ Sai: RDS không yêu cầu stopped state để tạo replica. Quá trình tạo replica diễn ra online (asynchronous replication). Stopped chỉ dùng cho maintenance/snapshot manual, không liên quan.
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- AWS RDS Read Replicas Documentation – Chi tiết engine-specific requirements cho SQL Server.
- RDS SQL Server Limitations – Xác nhận Multi-AZ bắt buộc.
- Automated Backups – Yêu cầu retention >0.
- Kiểm tra qua AWS Console: RDS > Databases > Create read replica.
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/CloudFormation, hãy hỏi nhé!
What is the MOST secure way to meet this new requirement?
- A Provision the DynamoDB table inside the same VPC that contains the Lambda functions
- B Create a gateway VPC endpoint for DynamoDB to provide access to the table
- C Use a network ACL to only allow access to the DynamoDB table from the VPC
- D Use a security group to only allow access to the DynamoDB table from the VPC
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 việc cung cấp quyền truy cập an toàn nhất cho các hàm AWS Lambda nằm trong private subnet của một VPC, để chúng có thể truy cập vào một bảng Amazon DynamoDB. Các yêu cầu chính bao gồm:
- Lambda không được phép truy cập internet công khai (no public internet access).
- Tất cả giao tiếp dữ liệu phải giữ trong mạng private (data communication remains within the private network).
- Mục tiêu: Đáp ứng yêu cầu mới mà an toàn nhất (MOST secure), tránh lộ dữ liệu ra ngoài và giảm thiểu rủi ro bảo mật.
Bối cảnh kỹ thuật:
- Lambda trong private subnet VPC thường cần NAT Gateway hoặc VPC Endpoint để truy cập dịch vụ AWS mà không ra internet.
- DynamoDB là dịch vụ fully managed, mặc định truy cập qua public endpoint (yêu cầu internet), nhưng có thể dùng VPC Endpoint để giữ traffic nội bộ AWS.
- Giải pháp phải không yêu cầu public IP, NAT, hoặc tunnel ra ngoài, đồng thời tuân thủ nguyên tắc least privilege và zero trust.
🛠️ Kiến thức cập nhật AWS (tính đến 2026): VPC Gateway Endpoint cho DynamoDB (interface và gateway types) vẫn là best practice cho private access. Không có thay đổi lớn từ AWS re:Invent 2025, vẫn khuyến nghị Gateway Endpoint cho DynamoDB để tối ưu chi phí và bảo mật (không route qua IGW/EGW).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a gateway VPC endpoint for DynamoDB to provide access to the table.
Lý do chi tiết:
- Gateway VPC Endpoint (không phải Interface Endpoint) dành riêng cho DynamoDB và S3, cho phép traffic giữ hoàn toàn trong mạng AWS backbone mà không cần NAT Gateway, public IP, hay internet.
- Lambda trong private subnet có thể gửi request trực tiếp đến endpoint qua private DNS resolution (tự động hoặc manual).
- An toàn nhất (MOST secure) vì: Zero egress traffic ra internet, hỗ trợ IAM policies để kiểm soát quyền chi tiết, không expose port ra ngoài, và miễn phí (không charge data processing như NAT).
- Cấu hình: Tạo endpoint trong VPC, associate với route tables của private subnets, enable private DNS nếu cần.
📋 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. Mỗi phương án được đánh giá với lý do cụ thể dựa trên best practices AWS:
-
❌ Provision the DynamoDB table inside the same VPC that contains the Lambda functions
Sai vì: DynamoDB là dịch vụ managed toàn cầu, không thể provision hoặc di chuyển vào VPC như EC2 hay RDS. DynamoDB không hỗ trợ "VPC-local" tables; tất cả tables đều accessible qua public endpoints hoặc VPC Endpoints. Lựa chọn này không khả thi về mặt kỹ thuật, vi phạm nguyên tắc thiết kế AWS. -
✅ Create a gateway VPC endpoint for DynamoDB to provide access to the table
Đúng vì: Như đã giải thích ở trên. Đây là giải pháp chính thức được AWS khuyến nghị cho private VPC access đến DynamoDB, đảm bảo traffic private 100%, không cần internet/NAT, và tích hợp IAM cho security. Hiệu suất cao, chi phí thấp (free tier cho endpoint). -
❌ Use a network ACL to only allow access to the DynamoDB table from the VPC
Sai vì: Network ACL (NACL) là stateless firewall ở mức subnet, chỉ kiểm soát inbound/outbound traffic vào subnet. Nó không thể restrict access đến dịch vụ AWS như DynamoDB (DynamoDB không có IP cố định hoặc port trong VPC). NACL không giải quyết vấn đề routing ra internet, và Lambda vẫn cần NAT/public route để reach DynamoDB → không đáp ứng yêu cầu private network. -
❌ Use a security group to only allow access to the DynamoDB table from the VPC
Sai vì: Security Groups (SG) là stateful firewall gắn với resources như EC2/ALB/Lambda ENI. DynamoDB không hỗ trợ attach SG (là managed service bên ngoài VPC). SG chỉ kiểm soát traffic giữa instances trong VPC, không áp dụng cho service endpoints → vô hiệu và không khả thi.
📘 Tài liệu tham khảo (AWS Official Docs - cập nhật 2026)
- VPC Endpoints for Amazon DynamoDB 🛠️ (Gateway Endpoint chi tiết).
- Using AWS Lambda with VPC 📘 (Private subnet + Endpoints).
- AWS Well-Architected Framework - Security Pillar (Least privilege với Endpoints).
- AWS re:Post & Whitepapers: Tìm "DynamoDB VPC Endpoint private Lambda" cho case studies.
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ụ code Terraform/CLI, hãy hỏi nhé!
How can the database team achieve this with the LEAST operational overhead?
- A Implement Amazon DynamoDB Accelerator (DAX) on the DynamoDB table. Use Amazon EventBridge (Amazon CloudWatch Events) to poll the DynamoDB table and drop items after 15 days
- B Turn on DynamoDB Streams for the DynamoDB table to push the data from DynamoDB to another storage location. Use AWS Lambda to poll and terminate items older than 15 days.
- C Turn on the TTL feature for the DynamoDB table. Use the TTL attribute as a timestamp and set the expiration of items to 15 days
- D Create an AWS Lambda function to poll the list of DynamoDB tables every 15 days. Drop the existing table and create a new table
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh một công ty startup đang phát triển xe điện (electric vehicles), các xe này sẽ gửi dữ liệu thời gian thực (real-time data) lên AWS Cloud để phân tích. Dữ liệu bao gồm các chỉ số chuyến đi (trip metrics), thời lượng chuyến đi (trip duration) và nhiệt độ động cơ (engine temperature). Nhóm database quyết định lưu trữ dữ liệu này trong Amazon DynamoDB chỉ trong 15 ngày.
Mục tiêu chính: Tìm cách thực hiện việc lưu trữ và tự động xóa dữ liệu sau 15 ngày với operational overhead thấp nhất (LEAST operational overhead). Nghĩa là ưu tiên giải pháp tự động, native của AWS, không cần quản lý thủ công nhiều, không tốn tài nguyên vận hành như code custom, polling định kỳ hay recreate table.
🛠️ Bối cảnh kỹ thuật: DynamoDB là NoSQL database serverless, phù hợp dữ liệu real-time từ IoT (xe điện). Vấn đề là quản lý lifecycle dữ liệu ngắn hạn (15 ngày) mà không làm phức tạp hệ thống.
📘 Kiến thức cập nhật AWS (đến 2026): DynamoDB hỗ trợ các tính năng native như TTL (Time to Live) để tự động xóa items cũ, không cần code thêm. Đây là giải pháp serverless, zero-maintenance cho retention policy ngắn.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Turn on the TTL feature for the DynamoDB table. Use the TTL attribute as a timestamp and set the expiration of items to 15 days.
Lý do chi tiết 🏆:
- TTL (Time to Live) là tính năng native, serverless của DynamoDB, cho phép tự động xóa các items sau thời gian chỉ định (expiration time) mà KHÔNG cần code custom, polling hay quản lý thủ công.
- Cách triển khai: Thêm attribute TTL (số nguyên, Unix timestamp) vào mỗi item khi insert (ví dụ: current_time + 152460*60 giây). DynamoDB backend tự xóa items expired trong vòng 48 giờ (thường nhanh hơn), zero operational overhead.
- Phù hợp hoàn hảo: Lưu 15 ngày real-time data từ xe điện, tiết kiệm chi phí lưu trữ lâu dài.
- Least overhead: Không Lambda, không Streams, không recreate table – chỉ enable TTL trên table và set attribute khi write data.
Nguồn tham khảo:
- AWS DynamoDB TTL Documentation (cập nhật 2024-2026, hỗ trợ TTL v2 với cải tiến performance).
🔍 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. Mỗi phương án được đánh giá với lý do cụ thể dựa trên operational overhead và tính phù hợp:
-
Implement Amazon DynamoDB Accelerator (DAX) on the DynamoDB table. Use Amazon EventBridge (Amazon CloudWatch Events) to poll the DynamoDB table and drop items after 15 days
❌ Sai: DAX là in-memory cache để tăng read performance (sub-millisecond latency), KHÔNG liên quan đến xóa data hay quản lý retention. EventBridge + poll/drop items yêu cầu code custom, scan table định kỳ (tốn RCU nặng, chi phí cao, overhead vận hành lớn). Không hiệu quả cho real-time data lớn từ xe điện. -
Turn on DynamoDB Streams for the DynamoDB table to push the data from DynamoDB to another storage location. Use AWS Lambda to poll and terminate items older than 15 days.
❌ Sai: DynamoDB Streams chỉ capture changes (insert/update/delete) để replicate data sang storage khác (như S3), KHÔNG tự xóa items gốc. Lambda poll + terminate yêu cầu query/scan table thường xuyên (overhead cao: code dev, error handling, RCU/WCU tốn kém, scaling Lambda). Phức tạp hơn TTL rất nhiều. -
Turn on the TTL feature for the DynamoDB table. Use the TTL attribute as a timestamp and set the expiration of items to 15 days
✅ Đúng (như đã giải thích ở trên): Giải pháp native, tự động 100%, overhead = 0 (chỉ enable feature + set attribute khi write). Hoàn hảo cho retention 15 ngày. -
Create an AWS Lambda function to poll the list of DynamoDB tables every 15 days. Drop the existing table and create a new table
❌ Sai: Cực kỳ overhead: Lambda poll mọi 15 ngày phải scan/delete/recreate toàn bộ table (downtime, mất data khác nếu table dùng chung, tốn WCU recreate schema/index). Không scale cho real-time data (xe gửi liên tục), vi phạm "least overhead" – phải manage IAM, error, backup manual.
Kết luận tổng quát 🎯: TTL là lựa chọn optimal cho DynamoDB retention ngắn hạn, giúp startup tập trung dev xe điện thay vì ops database. Nếu cần dài hạn hơn, có thể kết hợp DLM (DynamoDB Lifecycle) nhưng TTL đủ cho 15 ngày! 🚀
A database specialist finds a high degree of latency in the database writes. The database specialist must decrease the database latency by designing a solution that minimizes operational overhead.
Which solution will meet these requirements?
- A Eliminate the Multi-AZ deployment. Run the DB instance in only one Availability Zone
- B Recreate the DB instance. Use the default storage type. Reload the data from an automatic snapshot
- C Switch the storage to Provisioned IOPS SSD on the DB instance that is running
- D Recreate the DB instance. Use Provisioned IOPS SSD storage. Reload the data from an automatic snapshot
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh một tình huống thực tế trên AWS RDS:
Một công ty đang sử dụng Amazon RDS Multi-AZ DB instance trong môi trường phát triển (development environment), với loại lưu trữ General Purpose SSD (thường là gp2 hoặc gp3 theo các phiên bản mới nhất). DB instance này cung cấp dữ liệu cho một ứng dụng có ràng buộc I/O cao và workload OLTP (Online Transaction Processing) cao, dẫn đến tình trạng ứng dụng chậm do độ trễ cao (high latency) ở các hoạt động ghi (database writes).
📊 Vấn đề cốt lõi: General Purpose SSD (gp2/gp3) phù hợp cho workload cân bằng, nhưng không tối ưu cho OLTP với I/O-intensive writes vì IOPS bị giới hạn bởi kích thước volume (gp2: 3 IOPS/GB, tối đa 16,000 IOPS; gp3: baseline 3,000 IOPS, tối đa 16,000 IOPS). Điều này gây bottleneck ở writes.
🎯 Yêu cầu giải pháp: Giảm latency với operational overhead tối thiểu (minimize operational overhead), nghĩa là tránh downtime dài, không cần recreate instance hay reload data lớn. Giải pháp phải giữ nguyên Multi-AZ để đảm bảo high availability (HA).
🛠️ Kiến thức AWS cập nhật đến 2026: Theo tài liệu RDS mới nhất (rds-latest-userguide), RDS hỗ trợ modify storage type online từ gp2/gp3 sang Provisioned IOPS SSD (io1/io2) với downtime rất ngắn (thường <1 phút trong Multi-AZ), không cần snapshot/reload. io2 Block Express (từ 2023) cung cấp IOPS lên đến 256,000 và throughput 4,000 MB/s, lý tưởng cho OLTP high-write.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Switch the storage to Provisioned IOPS SSD on the DB instance that is running
Lý do:
- 🏆 Giải pháp này trực tiếp giải quyết vấn đề bằng cách nâng cấp storage sang Provisioned IOPS SSD (io1/io2), cho phép tùy chỉnh IOPS cao (từ 100-256,000) và throughput, tối ưu cho OLTP writes-intensive mà không giới hạn bởi kích thước volume như gp2/gp3.
- ⚡ Operational overhead tối thiểu: Có thể thực hiện modify in-place trên instance đang chạy (running), qua AWS Console/CLI/API. Trong Multi-AZ, quá trình failover tự động, downtime chỉ vài giây/phút. Không cần recreate hay reload data.
- 📈 Kết quả: Giảm latency writes ngay lập tức, phù hợp development env với I/O constraints.
🧪 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh:
-
❌ Eliminate the Multi-AZ deployment. Run the DB instance in only one Availability Zone
Sai vì: Việc loại bỏ Multi-AZ chỉ giảm chi phí/HA nhưng không giải quyết latency writes (vấn đề gốc từ storage type). Single-AZ vẫn dùng gp2/gp3, IOPS không thay đổi. Thậm chí tăng rủi ro downtime, vi phạm yêu cầu minimize overhead và giữ HA cho OLTP. -
❌ Recreate the DB instance. Use the default storage type. Reload the data from an automatic snapshot
Sai vì: "Default storage type" vẫn là General Purpose SSD (gp2/gp3), không cải thiện IOPS cho writes-intensive. Recreate + reload snapshot gây overhead cao (downtime hàng giờ, rủi ro data loss nếu snapshot cũ), hoàn toàn không cần thiết và không giảm latency. -
✅ Switch the storage to Provisioned IOPS SSD on the DB instance that is running
Đúng vì: Như đã giải thích ở phần đáp án, đây là cách tối ưu nhất với modify online, hỗ trợ io1/io2 trên RDS Multi-AZ (PostgreSQL/MySQL/SQL Server/Oracle). AWS tự động provision IOPS cao, giảm latency writes mà overhead gần zero. -
❌ Recreate the DB instance. Use Provisioned IOPS SSD storage. Reload the data from an automatic snapshot
Sai vì: Mặc dù dùng Provisioned IOPS SSD đúng hướng, nhưng recreate + reload gây overhead lớn (downtime dài, data migration thủ công, rủi ro lỗi). RDS hỗ trợ switch storage mà không cần recreate, nên phương án này thừa thãi và không "minimize operational overhead".
📘 Tài liệu tham khảo (AWS chính thức, cập nhật 2026)
- Amazon RDS Storage Types – Chi tiết modify io1/io2.
- Modifying DB Instance – Hướng dẫn switch storage online.
- RDS Multi-AZ Best Practices – Xác nhận hỗ trợ modify với minimal downtime.
- AWS Well-Architected Framework: Reliability Pillar (2024 edition) – Nhấn mạnh in-place changes cho OLTP workloads.
Hy vọng phân tích này giúp bạn nắm vững DOP-C02! 🚀 Nếu cần lab thực hành, hãy thử trên RDS Console.
What should the database specialist do to identify the target engine?
- A Use the AWS Schema Conversion Tool (AWS SCT) database migration assessment report
- B Use the AWS Schema Conversion Tool (AWS SCT) multiserver assessor
- C Use an AWS DMS pre-migration assessment
- D Use the AWS DMS data validation tool
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 quy trình migrate cơ sở dữ liệu Oracle on-premises sang một managed open-source database engine trên Amazon RDS bằng cách sử dụng AWS Database Migration Service (AWS DMS). 🛤️
- Mục tiêu chính: Database specialist cần xác định target engine phù hợp nhất dựa trên tỷ lệ phần trăm chuyển đổi (conversion percentage) của các database code objects như stored procedures, functions, views, và database storage objects.
- Tiêu chí lựa chọn: Chọn engine có ít công sức chuyển đổi thủ công (manual conversion effort) nhất, nghĩa là ưu tiên engine mà AWS có thể tự động hóa cao nhất (ví dụ: PostgreSQL, MySQL làm open-source managed trên RDS).
- Bối cảnh: AWS DMS dùng để migrate data, nhưng để đánh giá schema conversion (chuyển đổi cấu trúc DB), cần công cụ chuyên biệt để phân tích và báo cáo % tự động hóa trước khi migrate thực tế. Điều này giúp tránh lãng phí thời gian với engine yêu cầu chỉnh sửa thủ công nhiều. 🔍
Câu hỏi yêu cầu hành động cụ thể của specialist để identify target engine một cách hiệu quả.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use the AWS Schema Conversion Tool (AWS SCT) multiserver assessor
Lý do:
- AWS SCT multiserver assessor (còn gọi là multiserver assessment report) là tính năng chuyên dụng của AWS Schema Conversion Tool, cho phép đánh giá đồng thời nhiều target engines (như PostgreSQL, MySQL trên RDS) từ một source DB Oracle duy nhất. 🏆
- Nó tạo báo cáo chi tiết về % code objects được chuyển đổi tự động, % cần chỉnh sửa thủ công, và effort ước tính (bao gồm stored procedures, functions, views, triggers, v.v.).
- Báo cáo này so sánh trực tiếp các engines, giúp chọn engine có least manual conversion effort – chính xác khớp yêu cầu câu hỏi.
- Theo tài liệu AWS cập nhật 2024-2026, tính năng này được tối ưu hóa cho migration từ Oracle sang open-source RDS, tích hợp với DMS cho full migration workflow. ⚡
📋 Phân tích tất cả các phương án
-
✅ Use the AWS Schema Conversion Tool (AWS SCT) multiserver assessor
Giải thích đúng: Như trên, đây là công cụ lý tưởng để assess multiple targets cùng lúc, cung cấp metrics chính xác về conversion percentage và manual effort. Hoàn hảo cho việc chọn open-source engine trên RDS với ít chỉnh sửa nhất. 📊 -
❌ Use the AWS Schema Conversion Tool (AWS SCT) database migration assessment report
Giải thích sai: Báo cáo này chỉ tập trung vào một target engine cụ thể, không hỗ trợ so sánh multiserver. Không giúp identify engine tốt nhất mà chỉ đánh giá schema cho một lựa chọn duy nhất – thiếu khả năng so sánh effort giữa các open-source options. 🔄 -
❌ Use an AWS DMS pre-migration assessment
Giải thích sai: AWS DMS pre-migration assessment chủ yếu kiểm tra data migration readiness (như connectivity, performance, data types compatibility), không phân tích schema code objects như procedures/functions/views. Nó không đưa ra conversion percentage hay manual effort cho target engines. 🚫 -
❌ Use the AWS DMS data validation tool
Giải thích sai: Công cụ này chỉ dùng sau migration để validate data integrity (so sánh source/target data rows), không liên quan đến schema conversion assessment hay chọn target engine trước migrate. Hoàn toàn không phù hợp giai đoạn planning. ❌
📘 Tài liệu tham khảo (cập nhật AWS 2024-2026)
- AWS SCT Multiserver Assessment Report – Chi tiết về báo cáo multiserver cho Oracle to RDS open-source.
- AWS DMS & SCT Best Practices – Hướng dẫn kết hợp SCT + DMS cho heterogeneous migration.
- AWS Database Migration Guide – Blog chính thức về Fleet Advisor và multiserver assessor (tích hợp SCT).
Hy vọng phân tích này giúp bạn nắm vững kiến thức! 🚀 Nếu cần demo thực tế, hãy thử AWS SCT console miễn phí.
Which combination of stops should the database specialist take to meet those requirements? (Choose three.)
- A Set up an Amazon S3 destination bucket. Establish a trust relationship with an IAM role that includes permissions for Amazon RDS.
- B Set up an Amazon FSx for Windows File Server destination file system. Establish a trust relationship with an IAM role that includes permissions for Amazon RDS.
- C Create an option group. Add the SQLSERVER_BACKUP_RESTORE option to the option group
- D Modify the existing default option group. Add the SQLSERVER_BACKUP_RESTORE option to the option group
- E Back up the database by using the native BACKUP DATABASE TSQL command. Restore the database by using the RESTORE DATABASE TSQL command.
- F Back up the database by using the rds_backup_database stored procedure. Restore the database by using the rds_restore_database stored procedure.
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 triển khai chiến lược backup và restore tự nhiên (native backup/restore) cho cơ sở dữ liệu Amazon RDS for SQL Server của một công ty bán lẻ. Họ muốn linh hoạt hơn trong việc backup/restore, sử dụng native SQL Server backups và lưu trữ chúng một cách có khả năng mở rộng cao (highly scalable).
📌 Yêu cầu chính:
- Tạo native backup (sử dụng công cụ gốc của SQL Server) thay vì snapshot RDS thông thường.
- Lưu trữ backup vào nơi scalable (như S3).
- Chọn 3 bước kết hợp (combination of steps) để database specialist thực hiện.
🛠️ Bối cảnh AWS RDS SQL Server (cập nhật đến 2026): RDS hỗ trợ Native Backup and Restore qua option group với tùy chọn SQLSERVER_BACKUP_RESTORE. Backup được lưu vào S3 bucket (không phải FSx), sử dụng stored procedures đặc biệt của RDS (rds_backup_database và rds_restore_database). Không thể dùng lệnh T-SQL native trực tiếp vì RDS managed service giới hạn quyền sysadmin.
✅ Đáp án đúng (Chọn 3 phương án sau)
Các bước đúng phải kết hợp để kích hoạt tính năng, thiết lập lưu trữ S3 và thực hiện backup/restore qua stored procedures RDS-specific. Lý do chọn:
- Set up an Amazon S3 destination bucket. Establish a trust relationship with an IAM role that includes permissions for Amazon RDS. ✅ (Thiết lập bucket S3 làm đích lưu trữ scalable, IAM role cho RDS access).
- Create an option group. Add the SQLSERVER_BACKUP_RESTORE option to the option group. ✅ (Tạo option group mới để thêm option kích hoạt native backup).
- Back up the database by using the rds_backup_database stored procedure. Restore the database by using the rds_restore_database stored procedure. ✅ (Sử dụng procedures RDS để thực hiện backup/restore native, lưu vào S3).
Kết hợp 3 bước này tạo quy trình hoàn chỉnh: Option group → S3 + IAM → Stored procedures.
📋 Giải thích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên nội dung gốc tiếng Anh. Mỗi phương án được đánh giá ✅ (đúng) hoặc ❌ (sai) với lý do cụ thể dựa trên docs AWS RDS SQL Server Native Backup/Restore.
-
Set up an Amazon S3 destination bucket. Establish a trust relationship with an IAM role that includes permissions for Amazon RDS.
✅ Đúng: S3 là đích lưu trữ highly scalable duy nhất hỗ trợ native backup RDS SQL Server. IAM role (trusted by RDS service) cần permissions nhưs3:PutObject,s3:GetObject,s3:ListBucket. Bucket policy và trust relationship bắt buộc để RDS ghi/đọc backup files (.bak). -
Set up an Amazon FSx for Windows File Server destination file system. Establish a trust relationship with an IAM role that includes permissions for Amazon RDS.
❌ Sai: FSx for Windows không hỗ trợ native backup RDS SQL Server. Chỉ S3 bucket được AWS hỗ trợ cho tính năng này (không scalable như S3 cho petabyte-scale backups). FSx dùng cho shared file storage, không tích hợp trực tiếp với RDS backup option. -
Create an option group. Add the SQLSERVER_BACKUP_RESTORE option to the option group.
✅ Đúng: Phải tạo option group mới (không modify default), thêm option SQLSERVER_BACKUP_RESTORE (với S3 ARN làm setting). Sau đó associate với DB instance/replica. Điều này kích hoạt stored proceduresrds_backup_database/rds_restore_database. -
Modify the existing default option group. Add the SQLSERVER_BACKUP_RESTORE option to the option group.
❌ Sai: Không được modify default option group (RDS protected, immutable). AWS yêu cầu create new option group để tránh ảnh hưởng instances khác và tuân thủ best practices multi-DB management. -
Back up the database by using the native BACKUP DATABASE TSQL command. Restore the database by using the RESTORE DATABASE TSQL command.
❌ Sai: RDS SQL Server không cho phép native T-SQL BACKUP/RESTORE trực tiếp vì master user thiếu quyền sysadmin đầy đủ (managed service). Phải dùng RDS stored procedures (rds_backup_database/rds_restore_database) sau khi enable option group. -
Back up the database by using the rds_backup_database stored procedure. Restore the database by using the rds_restore_database stored procedure.
✅ Đúng: Đây là cách native backup chính thức sau khi enable option group. Procedures hỗ trợ compression, encryption, multi-file backups, lưu trực tiếp vào S3. Ví dụ:EXEC msdb.dbo.rds_backup_database @source_db_name='MyDB', @s3_arn_to_backup_to='arn:aws:s3:::bucketname/folder/MyDB_FULL.bak'.
📘 Tài liệu tham khảo (AWS Docs cập nhật 2026)
- Amazon RDS SQL Server Native Backup and Restore 🛠️ (Hướng dẫn chi tiết option group, S3 setup, stored procs).
- Adding an Option to an Option Group ✅ (Tạo option group mới, không modify default).
- IAM Permissions for RDS Backup to S3 🔒 (Trust policy và bucket policy mẫu).
- AWS re:Post & Well-Architected Framework: RDS Backup Best Practices (khuyến nghị S3 cho scalability > snapshot).
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần ví dụ code SQL hoặc lab thực hành, hãy hỏi thêm.