Ngân hàng đề — AWS Certified Database Specialty
Tìm thấy 358 câu.
Which solution meets these requirements?
- A Create an RDS for MySQL DB instance with an AWS Key Management Service (AWS KMS) customer managed CMK. Update the key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
- B Create an RDS for MySQL DB instance with an AWS managed CMK. Create a new key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
- C Create an RDS for MySQL DB instance with an AWS owned CMK. Create a new key policy to include the administrator user name of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
- D Create an RDS for MySQL DB instance with an AWS CloudHSM key. Update the key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
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 di chuyển (migrate) cơ sở dữ liệu MySQL từ on-premises sang Amazon RDS for MySQL, với hai yêu cầu bảo mật chính theo chính sách công ty:
- Tất cả cơ sở dữ liệu phải được mã hóa tại chỗ (encrypted at rest): Điều này có nghĩa là dữ liệu lưu trữ trên đĩa (như EBS volumes của RDS) phải được mã hóa.
- RDS DB instance snapshots phải được chia sẻ cross-account (giữa các tài khoản AWS khác nhau) để tạo môi trường testing và staging: Snapshot encrypted chỉ có thể share cross-account nếu sử dụng KMS customer managed key (CMK), và cần cấu hình key policy phù hợp để cho phép các tài khoản khác truy cập (thông qua
kms:CreateGrant).
🛠️ Vấn đề cốt lõi: RDS hỗ trợ encryption với AWS KMS, nhưng chỉ customer managed CMK mới cho phép chỉnh sửa key policy để share snapshot cross-account một cách linh hoạt. AWS managed/owned CMK không hỗ trợ điều này. Đây là kiến thức chuẩn trong AWS RDS và KMS (cập nhật đến 2026, không thay đổi cơ bản từ các phiên bản trước).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Create an RDS for MySQL DB instance with an AWS Key Management Service (AWS KMS) customer managed CMK. Update the key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
Lý do chọn đáp án này 🏆:
- Tạo RDS instance với customer managed CMK đảm bảo mã hóa at rest cho DB và snapshots.
- Update key policy thêm ARN của các account khác làm principal, và cho phép
kms:CreateGrantcho phép các account đó tạo grant tạm thời để copy/share snapshot cross-account. - Đây là giải pháp chính thức của AWS, an toàn và tuân thủ, vì customer managed CMK cho phép kiểm soát policy đầy đủ (khác với managed/owned keys).
📋 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 một cách chi tiết, giữ nguyên nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai kèm lý do cụ thể dựa trên tài liệu AWS mới nhất:
-
Create an RDS for MySQL DB instance with an AWS Key Management Service (AWS KMS) customer managed CMK. Update the key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
✅ Đúng vì: Sử dụng customer managed CMK cho phép chỉnh sửa key policy tự do. Thêm ARN account khác làm principal +kms:CreateGrantchính xác cho phép share snapshot cross-account mà không cần chia sẻ key trực tiếp, đảm bảo mã hóa at rest và tuân thủ security policy. -
Create an RDS for MySQL DB instance with an AWS managed CMK. Create a new key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
❌ Sai vì: AWS managed CMK (do RDS tự tạo) không cho phép chỉnh sửa hoặc tạo key policy mới. Bạn chỉ có quyền sử dụng cơ bản, không thể thêm principal cross-account hoặckms:CreateGrantđể share snapshot. -
Create an RDS for MySQL DB instance with an AWS owned CMK. Create a new key policy to include the administrator user name of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
❌ Sai vì: AWS owned CMK (do AWS sở hữu hoàn toàn) không cho phép bất kỳ chỉnh sửa policy nào, và không dùng username làm principal (phải dùng ARN/role). Hơn nữa, owned CMK không hỗ trợ share cross-account cho RDS snapshots. -
Create an RDS for MySQL DB instance with an AWS CloudHSM key. Update the key policy to include the Amazon Resource Name (ARN) of the other AWS accounts as a principal, and then allow the kms:CreateGrant action.
❌ Sai vì: RDS không hỗ trợ CloudHSM keys cho encryption at rest hoặc snapshots. CloudHSM dùng cho custom HSM, nhưng RDS chỉ hỗ trợ KMS keys (customer/managed). Không có key policy kiểu KMS cho CloudHSM trong ngữ cảnh này.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS RDS Encryption: Amazon RDS for MySQL Encryption at Rest – Xác nhận customer managed CMK cần cho cross-account snapshot sharing.
- KMS Key Policies for RDS Snapshots: Sharing Encrypted Snapshots và KMS Cross-Account Access – Chi tiết về
kms:CreateGrantvà principal ARN. - RDS Exam Guide (DOP-C02): AWS Certified DevOps Engineer Professional Official Guide, phần RDS Security & Encryption (không thay đổi đến 2026).
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é!
Which strategy meets these requirements with the LEAST amount of administrative work?
- A Use AWS Glue to crawl the data in the DynamoDB table. Create a job using an available blueprint to export the data to Amazon S3. Import the data from the S3 file to a DynamoDB table in the new account.
- B Create an AWS Lambda function to scan the items of the DynamoDB table in the current account and write to a file in Amazon S3. Create another Lambda function to read the S3 file and restore the items of a DynamoDB table in the new account.
- C Use AWS Data Pipeline in the current account to export the data from the DynamoDB table to a file in Amazon S3. Use Data Pipeline to import the data from the S3 file to a DynamoDB table in the new account.
- D Configure Amazon DynamoDB Streams for the DynamoDB table in the current account. Create an AWS Lambda function to read from the stream and write to a file in Amazon S3. Create another Lambda function to read the S3 file and restore the items to a DynamoDB table in the new account.
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 di chuyển (migrate) một bảng DynamoDB từ tài khoản AWS hiện tại sang tài khoản AWS mới trong bối cảnh công ty bán lẻ đang hợp nhất tài khoản (account consolidation). Yêu cầu chính là chọn chiến lược (strategy) đáp ứng với ÍT NHẤT CÔNG SỰ QUẢN TRỊ (LEAST amount of administrative work).
- Bối cảnh: Ứng dụng web lưu trữ dữ liệu trong DynamoDB. Cần migrate toàn bộ dữ liệu bảng mà không làm gián đoạn lớn, ưu tiên phương pháp đơn giản, tự động hóa cao.
- Thách thức chính: Di chuyển giữa các account khác nhau đòi hỏi phải export dữ liệu ra trung gian (như S3), sau đó import vào account mới. Phương pháp phải tối ưu hóa admin work (ít cấu hình, ít code custom, ít quản lý tài nguyên).
- Kiến thức AWS cập nhật 2026: DynamoDB hỗ trợ export trực tiếp sang S3 (point-in-time export từ 2020), nhưng cho cross-account migration, AWS Data Pipeline vẫn là lựa chọn chuẩn cho full table migration với ít admin nhất (tích hợp sẵn blueprint cho DynamoDB export/import). Các công cụ khác như DMS, Glue hoặc Lambda yêu cầu custom hơn.
📘 Tài liệu tham khảo:
- AWS Docs: Migrate DynamoDB tables (Export to S3).
- AWS Data Pipeline: DynamoDB export/import pipelines (Blueprint sẵn có, cross-account via S3).
- Best Practices: AWS Well-Architected Framework - Reliability Pillar (Migration strategies).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use AWS Data Pipeline in the current account to export the data from the DynamoDB table to a file in Amazon S3. Use Data Pipeline to import the data from the S3 file to a DynamoDB table in the new account.
🛠️ Lý do chọn:
- Ít admin work nhất: Data Pipeline cung cấp blueprint sẵn (template) cho DynamoDB → S3 export và S3 → DynamoDB import. Chỉ cần cấu hình IAM roles cross-account (S3 bucket policy), không cần code custom.
- Cross-account tự nhiên: Export từ account cũ → S3 (chia sẻ bucket), import từ account mới. Hỗ trợ full table, incremental nếu cần.
- Hiệu quả: Parallel processing, error handling built-in, monitoring qua console. Không scan full table thủ công như Lambda.
- Cập nhật 2026: Vẫn là recommended cho legacy migration (kết hợp với DMS cho online migration nếu cần zero-downtime).
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên độ phức tạp admin work, tính khả thi cross-account và hiệu suất.
-
❌ Phương án SAI: Use AWS Glue to crawl the data in the DynamoDB table. Create a job using an available blueprint to export the data to Amazon S3. Import the data from the S3 file to a DynamoDB table in the new account.
- Giải thích sai: Glue crawl chỉ metadata/schema, không export full data hiệu quả (phải custom Spark job). Blueprint export DynamoDB chưa tối ưu cho large table (scan chậm, không parallel tốt). Import cần custom script. Admin work cao: Cấu hình crawler/job/bookmark, IAM cross-account phức tạp hơn Data Pipeline. Không phải "least admin".
-
❌ Phương án SAI: Create an AWS Lambda function to scan the items of the DynamoDB table in the current account and write to a file in Amazon S3. Create another Lambda function to read the S3 file and restore the items of a DynamoDB table in the new account.
- Giải thích sai: Scan DynamoDB full table gây throttling/RCU tốn kém (không parallel native). Lambda có limit 15min/10GB, phải pagination phức tạp (code custom nhiều). Admin work cao: Viết/deploy 2 functions, handle errors/retries, cross-account invoke khó. Không scale cho big data.
-
✅ Phương án ĐÚNG: Use AWS Data Pipeline in the current account to export the data from the DynamoDB table to a file in Amazon S3. Use Data Pipeline to import the data from the S3 file to a DynamoDB table in the new account.
- Giải thích đúng: Như đã nêu ở trên. Least admin: Sử dụng pre-built template (ExportDDBToS3 + ImportFromS3ToDDB), chỉ config endpoint/S3 path/IAM. Cross-account seamless qua S3 bucket sharing. Hỗ trợ schedule/resume.
-
❌ Phương án SAI: Configure Amazon DynamoDB Streams for the DynamoDB table in the current account. Create an AWS Lambda function to read from the stream and write to a file in Amazon S3. Create another Lambda function to read the S3 file and restore the items to a DynamoDB table in the new account.
- Giải thích sai: Streams chỉ changes (không full data), cần backfill riêng. Lambda trigger Streams → S3 phức tạp (handle ordering/dupe). Admin work cao: Custom code 2 Lambdas, Kinesis/DynamoDB Streams setup, không phù hợp one-time migration full table. Laggy cho historical data.
🏆 Kết luận & Best Practice
Chiến lược Data Pipeline là tối ưu nhất cho offline migration cross-account với zero custom code. Nếu cần online migration (zero-downtime), khuyến nghị DynamoDB Global Tables hoặc DMS (cập nhật 2026). Test trước trên staging! 🚀
After a problem in production, the operations team has asked a database specialist to provide an IAM policy to read items from the database to debug the application. In addition, the developer is not allowed to access the value of the customerEmail field to stay compliant.
Which IAM policy should the database specialist use to achieve these requirements?
-
A
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Allow", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "orderID", "timestamp", "contract", "createdBy" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] } -
B
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Allow", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "customerEmail" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] } -
C
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Deny", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "customerEmail" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] } -
D
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Deny", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "orderID", "timestamp", "contract", "createdBy" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] }
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh việc thiết kế IAM policy cho Amazon DynamoDB table có tên contractDB ở region us-east-1. Schema của table bao gồm:
- orderID: Primary key (partition key).
- timestamp: Sort key.
- contract: Map attribute.
- createdBy: String attribute.
- customerEmail: String attribute (cần bảo vệ, không cho phép truy cập để tuân thủ quy định compliance).
Yêu cầu chính:
- Cho phép operations team (database specialist) thực hiện dynamodb:Query để đọc items từ table nhằm debug application sau sự cố production.
- Cấm tuyệt đối truy cập giá trị của field customerEmail (không được đọc hoặc bao gồm trong kết quả query).
- Policy phải chính xác, chỉ allow query khi developer chỉ định specific attributes hợp lệ (orderID, timestamp, contract, createdBy) qua ProjectionExpression, và block mọi request cố tình đọc customerEmail.
🛠️ Kiến thức cốt lõi: DynamoDB hỗ trợ fine-grained access control qua IAM conditions với các condition keys:
- dynamodb:Attributes: Danh sách attributes được request qua ProjectionExpression.
- dynamodb:Select: Phải là
"SPECIFIC_ATTRIBUTES"để enforce chỉ đọc attributes cụ thể. - Sử dụng ForAllValues:StringLike kết hợp StringEquals để whitelist (cho phép) chỉ các attributes cần thiết, block customerEmail.
📘 Tài liệu tham khảo (cập nhật AWS 2024-2026):
- DynamoDB IAM Fine-Grained Access Control – Chi tiết về condition keys
dynamodb:Attributesvàdynamodb:Select. - IAM Policy Elements for DynamoDB – Ví dụ policy projection attributes.
✅ Đáp án đúng: Phương án đầu tiên
Lý do lựa chọn:
- Policy này Allow action dynamodb:Query trên resource table chính xác.
- Condition hoàn hảo:
"StringEquals": {"dynamodb:Select": "SPECIFIC_ATTRIBUTES"}: Bắt buộc dùng ProjectionExpression để chỉ định attributes cụ thể (không cho phépALL_ATTRIBUTEShoặcCOUNT)."ForAllValues:StringLike": {"dynamodb:Attributes": ["orderID", "timestamp", "contract", "createdBy"]}: Whitelist – Tất cả attributes requested phải nằm trong danh sách này (không bao gồmcustomerEmail). Nếu query cố requestcustomerEmail, policy sẽ deny vì không match.
- Đảm bảo read-only cho debug, tuân thủ compliance 100%, phù hợp best practice AWS DOP-C02 (DevOps Professional).
📋 Giải thích chi tiết từng phương án
-
Phương án 1 (ĐÚNG) ✅
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Allow", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "orderID", "timestamp", "contract", "createdBy" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] }🟢 Giải thích đúng: Như trên, policy allow chính xác query chỉ với attributes cần thiết, block customerEmail hiệu quả. Hoàn hảo cho debug mà không vi phạm compliance.
-
Phương án 2 (SAI) ❌
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Allow", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "customerEmail" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] }🔴 Giải thích sai: Whitelist chỉ customerEmail – Chỉ allow query duy nhất attribute này, block tất cả attributes khác (orderID, timestamp,...). Trái ngược yêu cầu debug toàn bộ trừ customerEmail.
-
Phương án 3 (SAI) ❌
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Deny", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "customerEmail" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] }🔴 Giải thích sai: Effect: Deny chỉ khi request customerEmail với SPECIFIC_ATTRIBUTES. Tuy nhiên:
- Vẫn allow query
ALL_ATTRIBUTES(đọc toàn bộ, bao gồm customerEmail). - Không block đầy đủ, vi phạm compliance. Deny không phải cách whitelist attributes.
- Vẫn allow query
-
Phương án 4 (SAI) ❌
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IAMPolicy", "Effect": "Deny", "Action": [ "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb:us-east-1:123456789012:table/contractDB" ], "Condition": { "ForAllValues:StringLike": { "dynamodb:Attributes": [ "orderID", "timestamp", "contract", "createdBy" ] }, "StringEquals": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } } ] }🔴 Giải thích sai: Effect: Deny với whitelist attributes hợp lệ – Block chính xác những query debug cần thiết (orderID, etc.), chỉ allow query khác (như customerEmail hoặc ALL_ATTRIBUTES). Hoàn toàn ngược yêu cầu!
🛡️ Lưu ý triển khai: Attach policy này vào IAM role/user của database specialist. Test với AWS IAM Policy Simulator để verify. Đây là best practice cho least privilege trong DOP-C02 exam.
A database specialist needs to improve the performance of the process. The database specialist notes that, when the process is running, 15% of the table's provisioned read capacity units (RCUs) are being used.
What should the database specialist do?
- A Enable auto scaling for the DynamoDB table.
- B Use four threads and parallel DynamoDB API Scan operations.
- C Double the table's provisioned RCUs.
- D Set the Limit and Offset parameters before every call to the API.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh một ứng dụng sử dụng bảng Amazon DynamoDB để lưu trữ dữ liệu người dùng. Mỗi buổi sáng, một quy trình single-threaded (đơn luồng) gọi API Scan để quét toàn bộ bảng nhằm tạo báo cáo đầu ngày quan trọng cho quản lý. Sau chiến dịch marketing thành công, số lượng items trong bảng gấp đôi, dẫn đến quy trình chạy quá lâu và báo cáo bị trễ.
Chuyên gia cơ sở dữ liệu (database specialist) nhận thấy khi quy trình đang chạy, chỉ sử dụng 15% dung lượng đọc đã cung cấp (RCUs) của bảng.
Vấn đề cốt lõi: Không phải thiếu dung lượng đọc (vì chỉ dùng 15% RCUs, không bị throttle), mà là thời gian quét bảng sequential (tuần tự) quá lâu do bảng lớn hơn và Scan mặc định là single-threaded. Cần cải thiện hiệu suất quy trình Scan mà không lãng phí tài nguyên.
🛠️ Mục tiêu: Giảm thời gian thực thi Scan bằng cách tối ưu hóa cách quét dữ liệu (dựa trên tính năng Parallel Scan của DynamoDB, cập nhật đến 2026 vẫn giữ nguyên).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use four threads and parallel DynamoDB API Scan operations.
Lý do:
- API Scan mặc định quét tuần tự (1 segment), phù hợp với single-threaded nhưng chậm với bảng lớn.
- DynamoDB hỗ trợ Parallel Scan bằng cách chia bảng thành đa segments (tối đa 1 triệu segments, khuyến nghị 1 segment ~1MB/s throughput). Sử dụng 4 threads (mỗi thread xử lý 1 segment) sẽ song song hóa việc quét, giảm thời gian xuống còn ~1/4 (tùy phân bố dữ liệu).
- Chỉ dùng 15% RCUs chứng tỏ capacity đủ, parallel scan tận dụng tốt mà không tăng chi phí. Đây là giải pháp tối ưu nhất theo best practices AWS (không thay đổi đến 2026).
📘 Nguồn tham khảo: AWS DynamoDB Developer Guide - Parallel Scan: docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.ParallelScan.html.
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng phương án một cách chi tiết. Tôi giữ nguyên văn bản gốc bằng tiếng Anh, chỉ giải thích bằng tiếng Việt với lý do đúng/sai dựa trên kiến thức AWS mới nhất (2026):
-
❌ [SAI] Enable auto scaling for the DynamoDB table.
Phương án này kích hoạt auto scaling để tự động điều chỉnh RCUs dựa trên traffic. Tuy nhiên, vấn đề không phải thiếu capacity (chỉ dùng 15% RCUs, không throttle), mà là thời gian Scan sequential quá lâu. Auto scaling chỉ tăng/giảm dung lượng, không cải thiện tốc độ quét dữ liệu song song → Không giải quyết gốc rễ, lãng phí chi phí không cần thiết. -
✅ [ĐÚNG] Use four threads and parallel DynamoDB API Scan operations.
Như đã giải thích ở phần đáp án đúng: Sử dụng 4 threads với parallel Scan (chỉ địnhTotalSegments=4vàSegment=0..3cho từng thread) chia bảng thành 4 phần song song, giảm thời gian đáng kể mà tận dụng capacity hiện có (15% RCUs dư thừa). Đây là best practice chính thức của AWS cho Scan lớn. -
❌ [SAI] Double the table's provisioned RCUs.
Tăng gấp đôi RCUs provisioned chỉ tăng throughput đọc, nhưng Scan vẫn sequential single-threaded nên thời gian quét không giảm (vẫn phải đọc từng item theo thứ tự). Với 15% RCUs đã dùng, tăng capacity thừa thãi, tốn kém mà không hiệu quả → Không phù hợp. -
❌ [SAI] Set the Limit and Offset parameters before every call to the API.
Scan API không hỗ trợ Offset (chỉ Query hỗ trợ một phần qua pagination).Limitchỉ giới hạn items/response (cần paginate vớiExclusiveStartKey), nhưng vẫn sequential và không parallel → Thời gian tổng thể không giảm, thậm chí phức tạp hóa code mà không giải quyết vấn đề bảng lớn.
🛠️ Khuyến nghị bổ sung từ AWS Certified DevOps Engineer Professional
- Ưu tiên: Triển khai Parallel Scan với số threads phù hợp CPU (ví dụ: 4-16 threads). Giám sát qua CloudWatch Metrics (ConsumedReadCapacityUnits, ScanThrottleEvents).
- Alternative dài hạn (nếu có thể): Chuyển sang Query với index hoặc DynamoDB Streams + Lambda để pre-compute report, tránh Scan toàn bộ.
- Test: Sử dụng AWS SDK (Java/Node.js) với multi-threading để verify giảm thời gian >50%.
📘 Tài liệu chính: AWS Well-Architected Framework - DynamoDB (2026): aws.amazon.com/architecture/well-architected.
Amazon DynamoDB API. After the call returns, the script attempts to call PutItem.
Occasionally, the PutItem request fails with a ResourceNotFoundException error, which causes the workflow to fail. The development team has confirmed that the same table name is used in the two API calls.
How should a database specialist fix this issue?
- A Add an allow statement for the dynamodb:PutItem action in a policy attached to the role used by the application creating the table.
- B Set the StreamEnabled property of the StreamSpecification parameter to true, then call PutItem.
- C Change the application to call DescribeTable periodically until the TableStatus is ACTIVE, then call PutItem.
- D Add a ConditionExpression parameter in the PutItem request.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS DynamoDB
📖 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 đang xây dựng ứng dụng SaaS (Software as a Service), trong đó quy trình đăng ký người dùng mới sử dụng script Python gọi API CreateTable của Amazon DynamoDB để tạo bảng. Ngay sau khi lệnh CreateTable trả về thành công, script cố gắng gọi PutItem để chèn dữ liệu vào bảng đó. Tuy nhiên, thỉnh thoảng (occasionally), lệnh PutItem thất bại với lỗi ResourceNotFoundException, dẫn đến quy trình thất bại hoàn toàn. Đội ngũ phát triển đã xác nhận rằng tên bảng giống nhau trong cả hai lệnh gọi API.
🛠️ Vấn đề cốt lõi: DynamoDB hoạt động theo mô hình eventual consistency (tính nhất quán cuối cùng). Lệnh CreateTable chỉ khởi tạo quá trình tạo bảng (trạng thái CREATING), và bảng cần thời gian (thường vài giây đến vài phút) để chuyển sang trạng thái ACTIVE trước khi có thể thực hiện các thao tác đọc/ghi như PutItem. Nếu gọi PutItem ngay lập tức, DynamoDB có thể chưa nhận diện được bảng, gây lỗi ResourceNotFoundException. Giải pháp cần phải xử lý tình trạng này một cách đáng tin cậy, không phụ thuộc vào thời gian chờ cố định.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Change the application to call DescribeTable periodically until the TableStatus is ACTIVE, then call PutItem.
Lý do chi tiết:
Đây là cách chuẩn và được AWS khuyến nghị để xử lý tình trạng bảng chưa sẵn sàng sau CreateTable. Script cần polling (gọi lặp lại) API DescribeTable định kỳ (ví dụ: mỗi 1-5 giây) với exponential backoff để kiểm tra thuộc tính TableStatus. Chỉ khi TableStatus = "ACTIVE", mới gọi PutItem. Phương pháp này đảm bảo tính idempotent (có thể gọi lặp mà không gây lỗi) và xử lý được sự biến động về thời gian tạo bảng (có thể lên đến 1-2 phút tùy kích thước và tải hệ thống). Theo tài liệu AWS cập nhật đến 2026, đây là best practice cho on-demand table creation trong workflow production.
🔍 Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết. Tôi giữ nguyên văn bản gốc bằng tiếng Anh của phương án, chỉ giải thích lý do đúng/sai bằng tiếng Việt với emoji nổi bật:
-
❌ [SAI] Add an allow statement for the dynamodb:PutItem action in a policy attached to the role used by the application creating the table.
Giải thích sai: Lỗi ResourceNotFoundException không liên quan đến quyền truy cập IAM. Đây là lỗi do bảng chưa tồn tại hoặc chưa ACTIVE, chứ không phải thiếu permission cho dynamodb:PutItem. Nếu thiếu quyền, lỗi sẽ là AccessDeniedException. Việc thêm policy chỉ lãng phí và không giải quyết gốc rễ vấn đề về trạng thái bảng. (Không áp dụng exponential backoff hay polling). -
❌ [SAI] Set the StreamEnabled property of the StreamSpecification parameter to true, then call PutItem.
Giải thích sai: StreamSpecification chỉ dùng để kích hoạt DynamoDB Streams (dùng cho CDC - Change Data Capture hoặc Lambda triggers), không ảnh hưởng đến quá trình tạo bảng hay trạng thái ACTIVE. Thuộc tính StreamEnabled không liên quan đến việc bảng sẵn sàng cho PutItem. Thêm nó chỉ làm phức tạp request CreateTable mà không fix lỗi ResourceNotFoundException. -
✅ [ĐÚNG] Change the application to call DescribeTable periodically until the TableStatus is ACTIVE, then call PutItem.
Giải thích đúng: Như đã phân tích ở phần đáp án, đây là giải pháp polling chuẩn của AWS. DescribeTable trả về metadata bảng, bao gồm TableStatus (CREATING → ACTIVE). Polling định kỳ (với retry logic) đảm bảo script chờ đến khi bảng fully provisioned. Hỗ trợ SDK Python (boto3) với waiter nhưwaiter = client.get_waiter('table_exists')để tự động hóa. -
❌ [SAI] Add a ConditionExpression parameter in the PutItem request.
Giải thích sai: ConditionExpression dùng để kiểm tra điều kiện atomic trước khi ghi item (ví dụ: attribute_not_exists), không giải quyết vấn đề bảng chưa tồn tại. Nếu bảng chưa ACTIVE, PutItem vẫn fail với ResourceNotFoundException ngay từ đầu, bất kể condition. Đây chỉ hữu ích cho optimistic locking, không phải cho table readiness.
📘 Tài liệu tham khảo (cập nhật AWS đến 2026)
- AWS DynamoDB Developer Guide - Table Statuses: How It Works: Table Status – Giải thích CREATING → ACTIVE.
- Boto3 DynamoDB Waiters: Boto3 Docs - Waiters – Hỗ trợ
table_activewaiter cho polling tự động. - Best Practices for DynamoDB Provisioned Capacity: DynamoDB Best Practices – Khuyến nghị polling sau CreateTable.
- Exam Topic DOP-C02 (DevOps Engineer Pro): Phần DynamoDB operations và error handling (AWS re:Post & A Cloud Guru updates 2025-2026).
🛠️ Lời khuyên thực tế: Trong production, dùng AWS SDK Waiters hoặc AWS Step Functions để automate polling, tránh script Python thủ công dễ fail. Nếu cần scale, xem xét on-demand capacity mode để giảm thời gian tạo bảng!
Amazon S3.
Which solution meets these requirements?
- A Create a custom script that exports archival data from the DB cluster to Amazon S3 using a SQL view, then deletes the archival data from the DB cluster. Launch an Amazon EC2 instance with a weekly cron job to execute the custom script.
- B Configure an AWS Lambda function that exports archival data from the DB cluster to Amazon S3 using a SELECT INTO OUTFILE S3 statement, then deletes the archival data from the DB cluster. Schedule the Lambda function to run weekly using Amazon EventBridge (Amazon CloudWatch Events).
- C Configure two AWS Lambda functions: one that exports archival data from the DB cluster to Amazon S3 using the mysqldump utility, and another that deletes the archival data from the DB cluster. Schedule both Lambda functions to run weekly using Amazon EventBridge (Amazon CloudWatch Events).
- D Use AWS Database Migration Service (AWS DMS) to continually export the archival data from the DB cluster to Amazon S3. Configure an AWS Data Pipeline process to run weekly that executes a custom SQL script to delete the archival data from the DB cluster.
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 yêu cầu tuân thủ dữ liệu mới của một công ty trên AWS:
- 📊 Dữ liệu quan trọng phải được lưu trữ bền vững (durable) và dễ truy cập (readily accessible) trong 7 năm.
- 🗂️ Dữ liệu lưu trữ (archival data) là dữ liệu cũ hơn 1 năm, phải tự động di chuyển ra khỏi Amazon Aurora MySQL DB cluster hàng tuần.
- 📈 Lượng dữ liệu mới: Khoảng 10 GB/tháng được thêm vào cơ sở dữ liệu.
- 🎯 Nhiệm vụ của Database Specialist: Chọn giải pháp hoạt động hiệu quả nhất (operationally efficient) để migrate dữ liệu archival sang Amazon S3.
Yêu cầu chính: Giải pháp phải tự động, hàng tuần, xử lý di chuyển (export) và xóa dữ liệu cũ từ Aurora MySQL sang S3, tiết kiệm chi phí, serverless (ít quản lý tài nguyên), và tận dụng tính năng native của AWS để đảm bảo độ bền vững lâu dài (7 năm trên S3 với các lớp lưu trữ như S3 Intelligent-Tiering hoặc Glacier).
Bối cảnh AWS cập nhật đến 2026: Amazon Aurora MySQL (phiên bản 3.x dựa trên MySQL 8.0 hoặc 2.x dựa trên 5.7) hỗ trợ tính năng SELECT INTO OUTFILE S3 native để export trực tiếp từ DB sang S3 mà không cần trung gian, giúp hiệu quả cao cho workload nhỏ như 10GB/tháng. EventBridge (tên mới của CloudWatch Events) là scheduler serverless lý tưởng.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
Configure an AWS Lambda function that exports archival data from the DB cluster to Amazon S3 using a SELECT INTO OUTFILE S3 statement, then deletes the archival data from the DB cluster. Schedule the Lambda function to run weekly using Amazon EventBridge (Amazon CloudWatch Events).
🛠️ Lý do chi tiết:
- Hiệu quả hoạt động cao nhất (operationally efficient): Sử dụng Lambda serverless + EventBridge scheduler để chạy hàng tuần tự động, không cần quản lý server.
- Native export với SELECT INTO OUTFILE S3: Tính năng built-in của Aurora MySQL (hỗ trợ từ version 2.07+), export dữ liệu trực tiếp từ DB sang S3 qua SQL đơn giản, nhanh chóng, an toàn (IAM auth), phù hợp lượng dữ liệu nhỏ (10GB/tháng). Sau export, xóa dữ liệu cũ bằng SQL DELETE – tất cả trong một Lambda function duy nhất, giảm độ phức tạp.
- Đáp ứng đầy đủ: Dữ liệu trên S3 bền vững 7 năm (dùng lifecycle policies), dễ truy cập, tự động hóa hoàn toàn.
- Tiết kiệm: Không EC2, không tool ngoài, chi phí thấp (~$0.00001667/GB export + Lambda invocations).
📘 Tài liệu tham khảo:
- AWS Aurora Docs: SELECT INTO OUTFILE S3 (cập nhật 2024-2026).
- AWS Lambda + EventBridge: EventBridge Schedules.
❌ Phân tích tất cả các phương án
-
Phương án A (SAI):
Create a custom script that exports archival data from the DB cluster to Amazon S3 using a SQL view, then deletes the archival data from the DB cluster. Launch an Amazon EC2 instance with a weekly cron job to execute the custom script.
❌ Sai vì: Sử dụng EC2 + cron job không serverless, phải quản lý instance (patching, scaling, chi phí idle ~$10-20/tháng), kém hiệu quả so với Lambda. Custom script với SQL view phức tạp, không native export như SELECT INTO S3, dễ lỗi và tốn thời gian phát triển/O&M. -
Phương án B (ĐÚNG):
Configure an AWS Lambda function that exports archival data from the DB cluster to Amazon S3 using a SELECT INTO OUTFILE S3 statement, then deletes the archival data from the DB cluster. Schedule the Lambda function to run weekly using Amazon EventBridge (Amazon CloudWatch Events).
✅ Đúng vì: Như phân tích ở trên – serverless, native, một function duy nhất, tự động hóa hoàn hảo. -
Phương án C (SAI):
Configure two AWS Lambda functions: one that exports archival data from the DB cluster to Amazon S3 using the mysqldump utility, and another that deletes the archival data from the DB cluster. Schedule both Lambda functions to run weekly using Amazon EventBridge (Amazon CloudWatch Events).
❌ Sai vì: mysqldump không phải native cho Aurora-to-S3 trong Lambda (cần install binary, phức tạp, timeout với 10GB), phải dùng hai Lambda riêng biệt tăng độ phức tạp và rủi ro (race condition giữa export/xóa). Kém hiệu quả hơn SELECT INTO S3 đơn giản. -
Phương án D (SAI):
Use AWS Database Migration Service (AWS DMS) to continually export the archival data from the DB cluster to Amazon S3. Configure an AWS Data Pipeline process to run weekly that executes a custom SQL script to delete the archival data from the DB cluster.
❌ Sai vì: DMS dành cho migration liên tục/full (không phù hợp archival hàng tuần, overhead cao cho 10GB/tháng). AWS Data Pipeline đã deprecated (từ 2023, khuyến nghị dùng Glue/DataBrew), không serverless hiệu quả, phức tạp với custom SQL delete riêng biệt. Không operationally efficient.
Tóm tắt: Phương án B là tối ưu nhất nhờ tận dụng tính năng native Aurora + serverless AWS! 🚀
What is the MOST restrictive configuration for the DB instance security group?
- A Only allow incoming traffic from the sg-application-servers security group on port 3306.
- B Only allow incoming traffic from the sg-application-servers security group on port 443.
- C Only allow incoming traffic from the subnet of the application servers on port 3306.
- D Only allow incoming traffic from the subnet of the application servers on port 443.
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 thuộc chủ đề AWS VPC Security Groups và Amazon RDS, tập trung vào việc cấu hình security group cho một Amazon RDS for MySQL DB instance một cách restrictive nhất (hạn chế chặt chẽ nhất).
-
Bối cảnh:
- Ứng dụng được triển khai trên Amazon EC2 instances nằm sau Application Load Balancer (ALB).
- Các EC2 này sử dụng security group tên
sg-application-servers. - RDS MySQL được đặt trong private DB subnet (không tiếp xúc trực tiếp với internet).
- Mục tiêu: Cho phép ứng dụng truy cập RDS để lưu dữ liệu, nhưng tối ưu hóa bảo mật bằng cách chỉ mở đúng những traffic cần thiết vào RDS.
-
Vấn đề cốt lõi: Security group của RDS cần quy tắc inbound (incoming traffic) hạn chế nhất để chỉ EC2 servers mới kết nối được với RDS trên port chuẩn của MySQL (3306).
- Không dùng port HTTPS (443) vì đây là kết nối database nội bộ, không phải web.
- Restrictive nhất nghĩa là ưu tiên reference security group (của EC2) thay vì mở CIDR của subnet (vì subnet có thể chứa nhiều tài nguyên khác, kém an toàn hơn).
Kiến thức cập nhật đến 2026: AWS vẫn khuyến nghị sử dụng security group referencing (tham chiếu SG khác) để đạt least privilege principle (nguyên tắc quyền hạn tối thiểu), theo AWS Well-Architected Framework (Security Pillar). Không có thay đổi lớn ở RDS MySQL port (vẫn 3306 mặc định).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Only allow incoming traffic from the sg-application-servers security group on port 3306.
Lý do 🛠️:
- Đây là cấu hình restrictive nhất vì:
- Port 3306: Port chuẩn cho MySQL (RDS default), chỉ cho phép traffic database từ ứng dụng.
- Reference sg-application-servers: Security group của RDS chỉ kiểm tra source là các instance thuộc SG này (EC2 servers). Nếu EC2 thay đổi IP trong subnet, quy tắc vẫn tự động áp dụng mà không cần chỉnh sửa.
- An toàn hơn so với mở CIDR subnet (có thể chứa EC2 khác không liên quan).
- ALB không ảnh hưởng vì traffic từ app đến RDS là trực tiếp từ EC2 (không qua ALB cho DB connection).
- Đáp ứng least privilege: Chỉ EC2 cụ thể mới connect được.
📋 Giải thích tất cả các phương án (đúng/sai)
-
✅ Only allow incoming traffic from the sg-application-servers security group on port 3306.
Đúng 🏆: Như giải thích trên, đây là cách restrictive và scalable nhất. Reference SG cho phép dynamic update (EC2 scale in/out) mà không mở rộng rủi ro. -
❌ Only allow incoming traffic from the sg-application-servers security group on port 443.
Sai 🚫: Port 443 (HTTPS) dành cho web traffic (qua ALB), không phải MySQL. RDS MySQL không lắng nghe port 443 → Traffic bị block hoàn toàn, app không connect được DB. -
❌ Only allow incoming traffic from the subnet of the application servers on port 3306.
Sai ⚠️: Port đúng (3306), nhưng dùng CIDR subnet (ví dụ: 10.0.1.0/24) kém restrictive hơn reference SG. Subnet có thể chứa EC2 khác (bastion host, khác app) → Rủi ro bảo mật cao hơn, vi phạm least privilege. -
❌ Only allow incoming traffic from the subnet of the application servers on port 443.
Sai 🔒: Port sai (443) + CIDR kém an toàn. Không connect được DB, và mở rộng rủi ro cho toàn subnet.
📘 Tài liệu tham khảo (AWS Official Docs - cập nhật 2026)
- Security Groups for RDS: Amazon RDS User Guide - Working with Security Groups → Khuyến nghị reference EC2 SG.
- VPC Security Groups Rules: VPC User Guide - Security Group Rules → Giải thích referencing SG cho inbound.
- RDS MySQL Ports: RDS MySQL Parameters → Port 3306 mặc định.
- Well-Architected Framework: Security Pillar → Least privilege với SG referencing.
Cấu hình này giúp hệ thống zero-trust và dễ audit! 🚀 Nếu cần demo CloudFormation, hỏi thêm nhé!
How should the company perform this data load?
- A Use an AWS SDK with a multipart upload to transfer the data from on premises to the S3 bucket. Use the Copy command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
- B Use AWS Database Migration Service (AWS DMS) to transfer the data from on premises to the S3 bucket. Use the Loader command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
- C Use AWS DataSync to transfer the data from on premises to the S3 bucket. Use the Loader command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
- D Use the AWS CLI to transfer the data from on premises to the S3 bucket. Use the Copy command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh việc di chuyển 25 TB dữ liệu phát hiện gian lận từ on-premises sang Amazon Neptune trên AWS Cloud. Công ty đã thiết lập kết nối AWS Direct Connect 1 Gbps (với 80% băng thông khả dụng, tức khoảng 800 Mbps), có sẵn Amazon S3 bucket và S3 VPC endpoint để đảm bảo truyền dữ liệu private qua VPC mà không qua public internet. Mục tiêu là load dữ liệu bulk vào Neptune DB instance một cách hiệu quả, nhanh chóng và đáng tin cậy.
🛠️ Thách thức chính:
- Dữ liệu lớn (25 TB), cần tool hỗ trợ parallel transfer, compression, và tận dụng Direct Connect để tránh public internet.
- Neptune hỗ trợ bulk load từ S3 qua công cụ chuyên dụng (không phải database migration thông thường).
- Thời gian ước tính: Với 800 Mbps, transfer lý tưởng cần tool tối ưu để đạt tốc độ cao, giảm downtime.
📘 Kiến thức AWS cập nhật 2026: Neptune bulk loader sử dụng neptune-loader (dựa trên S3), DataSync là dịch vụ managed lý tưởng cho on-prem to S3 large-scale với agent, scheduling, và integration Direct Connect/VPC endpoint.
✅ Đáp án đúng
Use AWS DataSync to transfer the data from on premises to the S3 bucket. Use the Loader command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Lý do chọn đáp án này 🏆:
- AWS DataSync là dịch vụ managed chuyên transfer dữ liệu lớn từ on-premises sang S3 qua Direct Connect (private network), hỗ trợ agent cài trên on-prem server, parallel files (multi-thread), compression, deduplication, và scheduling. Với 25 TB và 80% bandwidth 1 Gbps, DataSync đạt hiệu suất cao (lên đến hàng Gbps), theo dõi tiến độ, retry tự động, và tích hợp VPC endpoint. Đây là best practice cho migration hybrid large-scale (AWS Well-Architected Framework).
- Loader command for Neptune (neptune-loader) là công cụ chính thức để bulk load từ S3 vào Neptune (hỗ trợ Gremlin/RDF bulk), parallel hóa việc đọc S3 và write vào DB với IAM role, nhanh hơn import trực tiếp.
- Kết hợp hoàn hảo: On-prem → S3 (DataSync) → Neptune (Loader), tận dụng S3 làm staging area.
📋 Phân tích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá ✅ (đúng) hoặc ❌ (sai), kèm lý do cụ thể dựa trên tính khả thi, hiệu suất và best practice AWS.
-
❌ Use an AWS SDK with a multipart upload to transfer the data from on premises to the S3 bucket. Use the Copy command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Giải thích sai: AWS SDK (như boto3 Python) hỗ trợ multipart upload cho S3, nhưng là low-level API cho developer, không managed service. Với 25 TB on-prem, phải tự code script xử lý parallel, error handling, retry → phức tạp, không scalable, tốn thời gian dev/test, và không tận dụng tối ưu Direct Connect bandwidth. Neptune không có "Copy command" (Copy là cho Redshift/RDS); dùng sai sẽ fail. -
❌ Use AWS Database Migration Service (AWS DMS) to transfer the data from on premises to the S3 bucket. Use the Loader command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Giải thích sai: AWS DMS dành cho database migration (CDC, full load giữa DB engines như Oracle → Neptune), không phải file transfer on-prem to S3. DMS hỗ trợ export DB dump sang S3 nhưng yêu cầu source là DB, không phù hợp dữ liệu fraud file-based. Phần Loader đúng nhưng bước đầu sai → không khả thi. -
✅ Use AWS DataSync to transfer the data from on premises to the S3 bucket. Use the Loader command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Giải thích đúng: Như đã phân tích ở phần đáp án, DataSync lý tưởng cho large on-prem to S3 (hỗ trợ NFS/SMB agent, Direct Connect, VPC endpoint), kết hợp Neptune Loader (neptune-loader) chuẩn bulk import từ S3. Hiệu suất cao, managed, zero-downtime. -
❌ Use the AWS CLI to transfer the data from on premises to the S3 bucket. Use the Copy command for Neptune to move the data in bulk from the S3 bucket to the Neptune DB instance.
Giải thích sai: AWS CLI (aws s3 cp/sync) hỗ trợ transfer cơ bản với multipart, nhưng là command-line manual, không parallel hóa tốt cho 25 TB (cần script phức tạp), thiếu monitoring/retry tự động, và chậm hơn DataSync trên Direct Connect. Neptune không hỗ trợ "Copy command" → bulk load fail.
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- AWS DataSync Documentation: docs.aws.amazon.com/datasync/latest/userguide/what-is-datasync.html – Best for on-premises to AWS storage.
- Amazon Neptune Bulk Loader: docs.aws.amazon.com/neptune/latest/userguide/bulk-load.html – Chi tiết neptune-loader từ S3.
- AWS Direct Connect + S3/VPC Endpoint: docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vpc-endpoints.html.
- AWS Well-Architected: Data Transfer: aws.amazon.com/architecture/well-architected/ – Khuyến nghị DataSync cho large migrations.
Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần demo code hoặc lab, hãy hỏi thêm nhé!
Which approach meets these requirements?
- A Set the max_connections parameter to 16,000 in the instance-level parameter group.
- B Modify the client connection timeout to 300 seconds.
- C Create an Amazon RDS Proxy database proxy and update client connections to point to the proxy endpoint.
- D Enable the query cache at the instance level.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm AWS
✅ Giải thích nội dung câu hỏi:
Câu hỏi tập trung vào một công ty đã di chuyển workload database quan trọng (business-critical) sang Amazon Aurora Multi-AZ DB cluster. Aurora Multi-AZ cung cấp tính sẵn sàng cao với failover tự động giữa các instance (primary và replicas), nhưng thời gian khôi phục ứng dụng (RTO - Recovery Time Objective) có thể bị ảnh hưởng bởi việc ứng dụng phải thiết lập lại kết nối (reconnect) sau failover. Công ty yêu cầu RTO rất thấp và cải thiện thời gian khôi phục ứng dụng sau failover database.
🛠️ Vấn đề cốt lõi: Sau failover trong Aurora Multi-AZ (thường mất vài giây), ứng dụng gặp độ trễ lớn do phải tạo kết nối mới (connection storms), dẫn đến thời gian recovery kéo dài. Giải pháp cần tập trung vào việc tối ưu hóa quản lý kết nối để giảm thiểu vấn đề này, theo các best practices AWS mới nhất (2024-2026).
📌 Đáp án đúng:
Create an Amazon RDS Proxy database proxy and update client connections to point to the proxy endpoint.
Lý do chọn: RDS Proxy là giải pháp chính thức của AWS để giảm RTO sau failover Aurora bằng connection pooling multiplexing. Proxy duy trì pool kết nối đến DB cluster, tái sử dụng kết nối sau failover mà không cần ứng dụng reconnect thủ công, giảm thời gian recovery từ hàng giây/phút xuống dưới 1 giây. Điều này đặc biệt hiệu quả với Aurora Multi-AZ, hỗ trợ đến phiên bản Aurora MySQL/PostgreSQL mới nhất (2026). ✅ Hoàn hảo khớp yêu cầu low RTO!
🧩 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, kèm giải thích chi tiết bằng tiếng Việt:
-
Set the max_connections parameter to 16,000 in the instance-level parameter group.
❌ Sai. Tăngmax_connectionschỉ cho phép DB instance xử lý nhiều kết nối đồng thời hơn, giúp tránh lỗi "too many connections". Tuy nhiên, nó không cải thiện thời gian recovery sau failover vì ứng dụng vẫn phải reconnect từ đầu, dẫn đến connection storms. Giá trị 16,000 có thể gây quá tải CPU/RAM instance, không liên quan đến RTO low. (Không khuyến nghị theo AWS best practices). -
Modify the client connection timeout to 300 seconds.
❌ Sai. Tăng timeout kết nối client lên 300 giây (5 phút) chỉ làm ứng dụng chờ lâu hơn trước khi báo lỗi reconnect, làm chậm recovery time chứ không cải thiện. Sau failover Aurora, ứng dụng vẫn gặp độ trễ lớn do phải tạo kết nối mới hàng loạt. Giải pháp này phản tác dụng với yêu cầu "very low RTO" và có thể tăng downtime tổng thể. -
Create an Amazon RDS Proxy database proxy and update client connections to point to the proxy endpoint.
✅ Đúng (như đã giải thích ở trên). RDS Proxy xử lý failover seamless bằng cách failover connections trong pool chỉ trong <60 giây (thường <1 giây với Aurora), giảm tải reconnect lên ứng dụng. Hỗ trợ Multi-AZ Aurora đầy đủ, tích hợp IAM auth, secrets rotation. Lý tưởng cho workload business-critical! -
Enable the query cache at the instance level.
❌ Sai. Query cache (parameterquery_cache_type) lưu cache kết quả query để tăng performance đọc lặp lại, nhưng không ảnh hưởng đến failover recovery hoặc RTO. Cache bị xóa sau failover, và Aurora ưu tiên shared buffer pool hơn query cache truyền thống (deprecated ở MySQL 8.0+). Không giải quyết vấn đề connection storms.
📘 Tài liệu tham khảo (AWS cập nhật mới nhất 2024-2026):
- Amazon RDS Proxy Documentation – Chi tiết connection pooling & failover benefits.
- Amazon Aurora Best Practices for High Availability – Khuyến nghị RDS Proxy cho low RTO.
- AWS Well-Architected Framework: Reliability Pillar (RDS Proxy giảm failover impact).
🛠️ Lời khuyên DevOps: Triển khai RDS Proxy với Auto Scaling proxy instances để scale theo traffic, kết hợp CloudWatch metrics theo dõiClientConnectionsvàDatabaseConnections.
What should the team do to meet this requirement?
- A Stop the DB instance and modify it to enable encryption. Apply this setting immediately without waiting for the next scheduled RDS maintenance window.
- B Stop the DB instance and create an encrypted snapshot. Restore the encrypted snapshot to a new encrypted DB instance. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
- C Stop the DB instance and create a snapshot. Copy the snapshot into another encrypted snapshot. Restore the encrypted snapshot to a new encrypted DB instance. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
- D Create an encrypted read replica of the DB instance. Promote the read replica to master. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
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 một công ty đang sử dụng Amazon RDS for MySQL DB instance cho các ứng dụng nội bộ, nhưng kiểm toán bảo mật phát hiện DB instance không được mã hóa at rest (mã hóa dữ liệu lưu trữ). Nhóm ứng dụng cần mã hóa DB instance để đáp ứng yêu cầu bảo mật.
📌 Vấn đề cốt lõi: AWS RDS không cho phép kích hoạt mã hóa at rest trên một DB instance đã tồn tại. Bạn phải tạo một DB instance mới từ encrypted snapshot (snapshot được mã hóa). Quy trình này yêu cầu downtime (dừng ứng dụng tạm thời) và cập nhật kết nối ứng dụng. Đây là quy định chuẩn của AWS RDS (áp dụng cho MySQL, cập nhật đến năm 2026, không có thay đổi lớn trong tính năng encryption cơ bản).
🛠️ Mục tiêu: Tìm phương án đúng để mã hóa mà không vi phạm quy tắc AWS, đảm bảo dữ liệu di chuyển an toàn và DB mới được mã hóa đầy đủ.
✅ Đáp án đúng: Phương án thứ 3
Stop the DB instance and create a snapshot. Copy the snapshot into another encrypted snapshot. Restore the encrypted snapshot to a new encrypted DB instance. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
Lý do lựa chọn:
- Đây là quy trình chuẩn theo tài liệu AWS để mã hóa RDS instance hiện có (unencrypted).
- Stop DB instance để tạo snapshot nhất quán (consistent snapshot).
- Tạo snapshot (ban đầu là unencrypted).
- Copy snapshot với tùy chọn mã hóa (KMS key) → Tạo encrypted snapshot.
- Restore thành DB instance mới đã mã hóa.
- Xóa instance cũ và cập nhật ứng dụng trỏ đến instance mới.
- Quy trình này an toàn, hỗ trợ MySQL, và đảm bảo toàn bộ dữ liệu (bao gồm automated backups) được mã hóa. Không có cách nào khác để enable encryption mà không tạo instance mới.
- Thời gian: Snapshot copy nhanh (thường vài phút đến giờ, tùy kích thước DB).
📋 Phân tích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai dựa trên quy tắc AWS RDS encryption (MySQL engine).
-
❌ Phương án 1 (SAI):
Stop the DB instance and modify it to enable encryption. Apply this setting immediately without waiting for the next scheduled RDS maintenance window.
Giải thích: Không thể modify DB instance hiện có để enable encryption at rest. AWS chỉ cho phép enable encryption tại thời điểm tạo instance mới. Dù stop instance và apply ngay, tính năng này vẫn bị chặn. Lỗi phổ biến trong kỳ thi DOP-C02. -
❌ Phương án 2 (SAI):
Stop the DB instance and create an encrypted snapshot. Restore the encrypted snapshot to a new encrypted DB instance. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
Giải thích: Không thể tạo trực tiếp "encrypted snapshot" từ unencrypted DB instance. Snapshot từ unencrypted DB sẽ là unencrypted. Phải copy snapshot trước rồi mới enable encryption trong bước copy. Phương án này bỏ qua bước copy, dẫn đến restore thất bại hoặc snapshot vẫn unencrypted. -
✅ Phương án 3 (ĐÚNG):
Stop the DB instance and create a snapshot. Copy the snapshot into another encrypted snapshot. Restore the encrypted snapshot to a new encrypted DB instance. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
Giải thích: Hoàn toàn chính xác theo best practice AWS. Bước copy snapshot với encryption enabled (sử dụng KMS) là chìa khóa. DB mới sẽ kế thừa encryption, hỗ trợ Multi-AZ, backups. Lý tưởng cho production với downtime tối thiểu. -
❌ Phương án 4 (SAI):
Create an encrypted read replica of the DB instance. Promote the read replica to master. Delete the original DB instance, and update the applications to point to the new encrypted DB instance.
Giải thích: Không thể tạo encrypted read replica từ unencrypted master. Read replica phải có cùng encryption status với master. Nếu master unencrypted, replica cũng unencrypted. Promote replica sẽ không giải quyết vấn đề mã hóa.
📘 Tài liệu tham khảo (Cập nhật AWS 2026)
- AWS RDS User Guide: Encrypting Amazon RDS resources – Xác nhận không modify existing instance, phải dùng snapshot copy.
- AWS DOP-C02 Exam Guide: Domain 3 (Automation), đề cập quy trình migration encryption.
- Blog AWS: Encrypt an unencrypted Amazon RDS DB instance (cập nhật 2024, vẫn áp dụng 2026).
- AWS Console: Thử nghiệm trong RDS → Snapshots → Copy with encryption.
🛡️ Lưu ý thực tế: Trong production, dùng AWS DMS cho zero-downtime migration nếu DB lớn. Luôn test endpoint update trong ứng dụng trước khi delete old instance!