Ngân hàng đề — AWS Certified SysOps Administrator Associate
Tìm thấy 936 câu.
The ELB and the EC2 instances are deployed by way of a single AWS CloudFormation stack in the us-east-1 Region. The web portal must be highly available across multiple Regions.
Which configuration will meet these requirements?
- A Deploy a copy of the stack in the us-west-2 Region. Create a single start of authority (SOA) record in Route 53 that includes the IP address from each ELB. Configure the SOA record with health checks. Use the ELB in us-east-1 as the primary record and the ELB in us-west-2 as the secondary record.
- B Deploy a copy of the stack in the us-west-2 Region. Create an additional A record in Route 53 that includes the ELB in us-west-2 as an alias target. Configure the A records with a failover routing policy and health checks. Use the ELB in us-east-1 as the primary record and the ELB in us-west-2 as the secondary record.
- C Deploy a new group of EC2 instances in the us-west-2 Region. Associate the new EC2 instances with the existing ELB, and configure load balancer health checks on all EC2 instances. Configure the ELB to update Route 53 when EC2 instances in us-west-2 fail health checks.
- D Deploy a new group of EC2 instances in the us-west-2 Region. Configure EC2 health checks on all EC2 instances in each Region. Configure a peering connection between the VPCs. Use the VPC in us-east-1 as the primary record and the VPC in us-west-2 as the secondary record.
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 tăng tính sẵn sàng cao (high availability - HA) cho một web portal được triển khai trên các instance Amazon EC2, sử dụng Elastic Load Balancer (ELB) và Amazon Route 53 làm dịch vụ DNS công khai. Toàn bộ stack (bao gồm ELB và EC2) được deploy qua một AWS CloudFormation stack duy nhất tại Region us-east-1.
Yêu cầu chính: Web portal phải HA across multiple Regions (có sẵn ở nhiều Region), nghĩa là nếu Region chính (us-east-1) gặp sự cố, traffic sẽ tự động chuyển sang Region khác (ví dụ us-west-2).
🔑 Vấn đề cốt lõi: Cần thiết lập DNS failover qua Route 53 để Route 53 kiểm tra health check của ELB ở từng Region và chuyển hướng traffic từ primary sang secondary một cách tự động. Không chỉ copy stack mà phải cấu hình routing policy phù hợp để hỗ trợ multi-Region HA.
📘 Kiến thức AWS cập nhật (đến 2026): Route 53 hỗ trợ Failover routing policy với Alias records trỏ đến ELB DNS name (không dùng IP trực tiếp vì ELB IP động). Health checks trên ELB endpoint để Route 53 quyết định failover. (Không hỗ trợ cross-Region ELB attachment trực tiếp).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Lựa chọn thứ 2.
Lý do: Phương án này triển khai copy đầy đủ stack (bao gồm ELB mới) ở us-west-2 qua CloudFormation, sau đó tạo A record alias bổ sung trong Route 53 trỏ đến ELB us-west-2. Sử dụng failover routing policy với health checks (Route 53 kiểm tra ELB endpoint), đặt us-east-1 ELB là primary và us-west-2 ELB là secondary. Khi primary fail health check, traffic tự động failover sang secondary. Đây là best practice chuẩn AWS cho multi-Region HA với ELB + Route 53, đảm bảo zero-downtime và tự động hóa. 🛠️ Hoàn hảo vì giữ nguyên kiến trúc gốc và tận dụng Alias (miễn phí, theo dõi ELB DNS động).
📋 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 bằng tiếng Anh, đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích bằng tiếng Việt:
-
❌ [SAI] Deploy a copy of the stack in the us-west-2 Region. Create a single start of authority (SOA) record in Route 53 that includes the IP address from each ELB. Configure the SOA record with health checks. Use the ELB in us-east-1 as the primary record and the ELB in us-west-2 as the secondary record.
Lý do sai: SOA record là metadata record bắt buộc của mỗi hosted zone trong Route 53 (không dùng để route traffic hoặc failover). Không thể include IP của nhiều ELB vào một SOA record, và SOA không hỗ trợ health checks hay primary/secondary. Sử dụng IP trực tiếp thay vì Alias DNS name của ELB là sai (ELB IP động, thay đổi thường xuyên). 🧩 Không đạt HA vì không có routing policy đúng. -
✅ [ĐÚNG] Deploy a copy of the stack in the us-west-2 Region. Create an additional A record in Route 53 that includes the ELB in us-west-2 as an alias target. Configure the A records with a failover routing policy and health checks. Use the ELB in us-east-1 as the primary record and the ELB in us-west-2 as the secondary record.
Lý do đúng: Như đã giải thích ở phần đáp án. Failover policy với Alias A record trỏ ELB DNS (ví dụ: my-elb-123456789.us-east-1.elb.amazonaws.com) và health checks trên ELB target group/port. Route 53 tự động resolve và failover khi primary unhealthy. 🛠️ Tuân thủ AWS best practice, hỗ trợ CloudFormation stack copy dễ dàng. -
❌ [SAI] Deploy a new group of EC2 instances in the us-west-2 Region. Associate the new EC2 instances with the existing ELB, and configure load balancer health checks on all EC2 instances. Configure the ELB to update Route 53 when EC2 instances in us-west-2 fail health checks.
Lý do sai: ELB không thể cross-Region attachment (ELB chỉ hoạt động trong Region của nó, không associate EC2 từ us-west-2 vào ELB us-east-1). Route 53 không được ELB "update" trực tiếp theo cách này (ELB không có tính năng tự update Route 53 record). ❌ Health checks chỉ intra-Region, không giải quyết multi-Region HA. -
❌ [SAI] Deploy a new group of EC2 instances in the us-west-2 Region. Configure EC2 health checks on all EC2 instances in each Region. Configure a peering connection between the VPCs. Use the VPC in us-east-1 as the primary record and the VPC in us-east-2 as the secondary record.
Lý do sai: EC2 health checks là cơ bản (status check), không dùng cho DNS failover. VPC peering chỉ cho network connectivity cross-Region (không liên quan DNS routing, và không dùng VPC làm "record" trong Route 53). Route 53 không có record kiểu "VPC record" cho primary/secondary. 🧩 VPC peering tốn kém, phức tạp, không tự động failover traffic public.
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- Route 53 Failover Routing: docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-failover.html – Chi tiết Alias records cho ELB và health checks.
- Multi-Region HA với ELB: docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-multi-region.html – Khuyến nghị copy stacks + Route 53 failover.
- CloudFormation Cross-Region: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html – Sử dụng StackSets cho multi-Region deploy.
- AWS Well-Architected Framework - Reliability Pillar: Nhấn mạnh failover DNS cho global HA.
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ụ CloudFormation template, hãy hỏi nhé!
Which of the following are possible causes of this issue? (Choose two.)
- A A network ACL associated with the bastion's subnet is blocking the network traffic.
- B The instance does not have a private IP address.
- C The route table associated with the bastion's subnet does not have a route to the internet gateway.
- D The security group for the instance does not have an inbound rule on port 22.
- E The security group for the instance does not have an outbound rule on port 3389.
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 một SysOps administrator đang điều tra sự cố mà người dùng không thể kết nối RDP (Remote Desktop Protocol) từ máy tính cá nhân tại nhà qua internet đến bastion server chạy trên Amazon EC2 instance Windows.
- Bastion server ở đây là máy chủ trung gian (jump host) để kết nối an toàn, thường đặt trong public subnet để tiếp nhận kết nối từ internet.
- RDP là giao thức dành cho Windows, sử dụng port 3389 (TCP) để inbound traffic từ client (nhà người dùng) đến server (EC2 bastion).
- Vấn đề: Kết nối thất bại từ internet, nên cần kiểm tra các lớp bảo mật và mạng VPC: Security Groups (stateful), Network ACLs (stateless), Route Tables, và cấu hình IP.
- Yêu cầu chọn 2 nguyên nhân có thể gây ra vấn đề này, dựa trên kiến thức AWS VPC và EC2 cập nhật đến năm 2026 (không thay đổi cơ bản từ các phiên bản trước như VPC Flow Logs, Transit Gateway enhancements).
📘 Tài liệu tham khảo:
- AWS VPC User Guide: Network ACLs, Route Tables.
- AWS EC2 User Guide: Connect to Windows Instance using RDP.
- AWS Well-Architected Framework: Reliability Pillar ( bastion hosts).
✅ Đáp án đúng (Chọn 2)
Các nguyên nhân đúng là những yếu tố cơ bản chặn traffic RDP từ internet đến EC2 bastion:
-
A network ACL associated with the bastion's subnet is blocking the network traffic.
🛠️ Lý do: NACL là stateless firewall ở mức subnet, yêu cầu explicit allow cả inbound (port 3389 từ internet) và outbound (ephemeral ports 1024-65535 cho response). Nếu block, traffic RDP sẽ bị drop. -
The route table associated with the bastion's subnet does not have a route to the internet gateway.
🛠️ Lý do: Bastion phải ở public subnet với route0.0.0.0/0 -> IGWđể nhận inbound traffic từ internet. Không có route này, traffic từ internet không route đến instance.
📋 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 phương án một, giữ nguyên nội dung gốc bằng tiếng Anh, với lý do đúng/sai dựa trên nguyên tắc AWS VPC/EC2:
-
✅ A network ACL associated with the bastion's subnet is blocking the network traffic.
🛠️ Đúng: NACL kiểm soát traffic ở subnet level, stateless nên phải allow inbound 3389/TCP từ 0.0.0.0/0 và outbound ephemeral ports. Block ở đây sẽ ngăn RDP hoàn toàn, phổ biến trong troubleshooting. -
❌ The instance does not have a private IP address.
🛠️ Sai: Mọi EC2 instance luôn có private IP (primary private IPv4). Public IP là optional cho internet access; thiếu public IP mới là vấn đề, nhưng câu này nói "private IP" nên không liên quan. -
✅ The route table associated with the bastion's subnet does not have a route to the internet gateway.
🛠️ Đúng: Public subnet cần route0.0.0.0/0 -> IGWđể traffic internet đến được instance. Bastion RDP yêu cầu điều này; thiếu route, traffic bị drop ở VPC level. -
❌ The security group for the instance does not have an inbound rule on port 22.
🛠️ Sai: Port 22 là SSH (Linux), không phải RDP (Windows, port 3389). Security Group cần inbound 3389/TCP từ client IP/internet, không phải 22. -
❌ The security group for the instance does not have an outbound rule on port 3389.
🛠️ Sai: RDP là inbound từ client đến server, server chỉ cần outbound ephemeral ports (1024-65535) cho response. SG mặc định allow all outbound; không cần explicit outbound 3389.
🛠️ Khuyến nghị troubleshooting thực tế
- Kiểm tra Reachability Analyzer hoặc VPC Flow Logs để trace traffic.
- Đảm bảo bastion có public IP/Elastic IP, SG inbound 3389, và NACL/SG không conflict.
- Best practice 2026: Sử dụng AWS Systems Manager Session Manager thay bastion truyền thống để tránh mở RDP public.
Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Creates an EC2 Instance'
Resources:
EC2Instance:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-79fd7eee
InstanceType: m5n.large
SubnetId: subnet-1abc3d3fg
PrivateDnsName: ip-10-24-34-0.ec2.internal
Tags:
- Key: Name
Value: !Sub "${AWS::StackName} Instance"
Why will the stack creation fail?
- A The Outputs section of the CloudFormation template was omitted.
- B The Parameters section of the CloudFormation template was omitted.
- C The PrivateDnsName cannot be set from a CloudFormation template.
- D The VPC was not specified in the CloudFormation template.
Xem giải thích
📝 Phân tích câu hỏi
Câu hỏi yêu cầu chúng ta phân tích một template AWS CloudFormation và xác định lý do tại sao việc tạo stack có thể thất bại. Template này định nghĩa một tài nguyên EC2 instance với một số thuộc tính.
🔍 Phân tích template
Template này có các phần chính sau:
AWSTemplateFormatVersion: xác định phiên bản của template.Description: mô tả ngắn gọn về template.Resources: định nghĩa các tài nguyên sẽ được tạo, trong trường hợp này là một EC2 instance.
👀 Phân tích các thuộc tính của EC2 instance
ImageId,InstanceType,SubnetId: các thuộc tính này được sử dụng để định nghĩa EC2 instance.PrivateDnsName: thuộc tính này được sử dụng để đặt tên DNS riêng cho instance.
🚨 Lý do stack creation thất bại
Bây giờ, hãy xem xét các lựa chọn:
Lựa chọn 1: The Outputs section of the CloudFormation template was omitted.
❌ Sai: Phần Outputs không bắt buộc trong một template CloudFormation. Nó chỉ được sử dụng để xuất các giá trị từ stack.
Lựa chọn 2: The Parameters section of the CloudFormation template was omitted.
❌ Sai: Tương tự như phần Outputs, phần Parameters cũng không bắt buộc. Nó được sử dụng để nhập các giá trị vào stack.
Lựa chọn 3: The PrivateDnsName cannot be set from a CloudFormation template.
✅ Đúng: Trong AWS CloudFormation, thuộc tính PrivateDnsName không thể được đặt trực tiếp trong template. Thay vào đó, bạn có thể sử dụng tính năng Auto của AWS để tạo tên DNS riêng.
Lựa chọn 4: The VPC was not specified in the CloudFormation template.
❌ Sai: Trong template này, không có yêu cầu bắt buộc phải chỉ định VPC. Tử subnet-id subnet-1abc3d3fg có thể nằm trong một VPC.
📚 Tài liệu tham khảo
👍 Kết luận
Lý do stack creation thất bại là do thuộc tính PrivateDnsName không thể được đặt trực tiếp trong template CloudFormation.
*** Error Establishing a Database Connection
Which of the following may be causes of the connectivity problems? (Choose two.)
- A The security group for the database does not have the appropriate egress rule from the database to the web server.
- B The certificate used by the web server is not trusted by the RDS instance.
- C The security group for the database does not have the appropriate ingress rule from the web server to the database.
- D The port used by the application developer does not match the port specified in the RDS configuration.
- E The database is still being created and is not available for connectivity.
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 ứng dụng mới được triển khai trên các Amazon EC2 instances (làm web server), và ứng dụng này cần kết nối đến Amazon RDS database instance để truy cập dữ liệu. Khi deploy đầy đủ vào môi trường production, ứng dụng thất bại với lỗi lặp lại trong logs của web server: Error Establishing a Database Connection (Lỗi thiết lập kết nối cơ sở dữ liệu).
📌 Điểm quan trọng:
- Database có thể query được từ console trên bastion host (một host trung gian an toàn), chứng tỏ RDS đang hoạt động bình thường và có thể kết nối từ một số nguồn.
- Vấn đề chỉ xảy ra từ web servers (EC2), không phải database bị down.
- Đây là câu hỏi multi-select (chọn TWO nguyên nhân có thể gây vấn đề kết nối).
- Chủ đề tập trung vào network connectivity giữa EC2 và RDS, thường liên quan đến Security Groups (SG), ports, và cấu hình kết nối (theo kiến thức AWS cập nhật đến 2026, RDS vẫn sử dụng mô hình VPC Security Groups với inbound/outbound rules).
🛠️ Ngữ cảnh AWS: EC2 (client) kết nối đến RDS (server) qua TCP trên port cụ thể (ví dụ: MySQL 3306, PostgreSQL 5432). Kết nối yêu cầu: SG của RDS phải cho phép ingress từ nguồn (EC2 SG hoặc IP), và SG của EC2 phải cho phép egress (mặc định allow all). Lỗi này thường do misconfiguration network, không phải auth hoặc data issues.
✅ Đáp án đúng (Chọn TWO)
Hai phương án đúng là:
- The security group for the database does not have the appropriate ingress rule from the web server to the database.
- The port used by the application developer does not match the port specified in the RDS configuration.
Lý do lựa chọn 📘:
Những lỗi này trực tiếp gây ra "Error Establishing a Database Connection" từ EC2 đến RDS. SG RDS thiếu ingress rule sẽ chặn traffic incoming từ web server (EC2). Port mismatch khiến connection attempt fail ngay lập tức. Bastion host connect được chứng tỏ RDS available, chỉ vấn đề từ EC2 side. (Nguồn: AWS RDS Troubleshooting Guide - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Troubleshooting.Connections.html; Security Groups - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.SecurityGroups.html - cập nhật 2024-2026).
🔍 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:
-
The security group for the database does not have the appropriate egress rule from the database to the web server.
❌ SAI. Security Group (SG) của RDS không cần egress rule từ DB đến web server vì RDS là server (listener), chỉ nhận kết nối incoming từ client (EC2). Traffic flow một chiều: EC2 → RDS (TCP port). Egress của RDS mặc định allow all outbound, nhưng vấn đề chính là ingress vào RDS. Bastion connect được nên SG RDS có rule cho bastion, nhưng thiếu cho web server. (🛠️ Không liên quan đến lỗi này). -
The certificate used by the web server is not trusted by the RDS instance.
❌ SAI. RDS không kiểm tra certificate của web server (client). RDS hỗ trợ SSL/TLS cho kết nối encrypted (client verify RDS cert), nhưng cert của EC2 không được RDS trust hay check. Đây là lỗi auth/cert mismatch phía client, không gây "connection error" cơ bản. Bastion connect được xác nhận RDS cert OK. (📌 AWS RDS SSL: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html). -
The security group for the database does not have the appropriate ingress rule from the web server to the database.
✅ ĐÚNG. Đây là nguyên nhân phổ biến nhất! SG RDS cần ingress rule cho phép traffic từ SG của EC2 (hoặc CIDR/IP của EC2) trên port DB (e.g., 3306). Thiếu rule này, RDS reject kết nối ngay, gây lỗi "connection refused". Bastion có rule riêng nên connect OK. (🛠️ Fix: Add inbound rule SG RDS source=EC2 SG). -
The port used by the application developer does not match the port specified in the RDS configuration.
✅ ĐÚNG. Ứng dụng trên EC2 connect đến RDS endpoint với port sai (e.g., code dùng 3307 thay vì 3306) sẽ fail connection. RDS config port fixed khi tạo instance (có thể customize). Logs lỗi này thường do port mismatch. Bastion dùng đúng port nên OK. (🛠️ Kiểm tra: RDS console → Connectivity & security → Endpoint & Port). -
The database is still being created and is not available for connectivity.
❌ SAI. Câu hỏi rõ ràng bastion host có thể query DB, chứng tỏ RDS available và status "Available". RDS creation complete trước khi production deploy. Lỗi chỉ từ web servers, không phải DB down. (📘 Status check: RDS Monitoring - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/monitoring-cloudwatch.html).
🧩 Tóm tắt DevOps tips: Trong production, luôn test connectivity từ EC2 (telnet endpoint port), kiểm tra SG rules (inbound RDS từ EC2 SG), và connection string (host, port, credentials). Sử dụng AWS VPC Flow Logs để debug traffic deny! (Nguồn: AWS Well-Architected Framework - Reliability Pillar, 2026 edition).
Which solution meets this requirement in the MOST operationally efficient manner?
- A Store the database credentials in AWS Secrets Manager. Configure automatic rotation for the secret every 365 days.
- B Store the database credentials as a parameter in the RDS parameter group. Create a database trigger to rotate the password every 365 days.
- C Store the database credentials in a private Amazon S3 bucket. Schedule an AWS Lambda function to generate a new set of credentials every 365 days.
- D Store the database credentials in AWS Systems Manager Parameter Store as a secure string parameter. Configure automatic rotation for the parameter every 365 days.
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 yêu cầu tuân thủ (compliance) từ đội ngũ compliance: Tất cả mật khẩu quản trị viên (administrator passwords) cho các Amazon RDS DB instances phải được thay đổi ít nhất hàng năm (at least annually). Chúng ta cần tìm giải pháp đáp ứng yêu cầu này một cách hiệu quả vận hành nhất (MOST operationally efficient manner).
- Bối cảnh AWS: Amazon RDS là dịch vụ cơ sở dữ liệu quan hệ được quản lý, nơi mật khẩu admin (master password) cần được luân phiên (rotate) định kỳ để đảm bảo bảo mật. Giải pháp phải tự động hóa quá trình rotation (thay đổi mật khẩu trên RDS instance và cập nhật nơi lưu trữ credentials), giảm thiểu can thiệp thủ công, dễ quản lý quy mô lớn và tích hợp native với AWS services.
- Yêu cầu cốt lõi: Rotation mỗi 365 ngày, hiệu quả vận hành cao nghĩa là sử dụng tính năng built-in của AWS, không cần code custom phức tạp, Lambda thủ công hay can thiệp DB trực tiếp.
- Kiến thức cập nhật 2026: Theo tài liệu AWS mới nhất (phiên bản Secrets Manager và RDS 2024-2026), AWS khuyến nghị AWS Secrets Manager cho rotation tự động RDS credentials vì nó tích hợp sâu, hỗ trợ thay đổi password trên DB instance mà không downtime (zero-downtime rotation). Parameter Store chỉ lưu trữ, không rotate tự động cho RDS.
📘 Tài liệu tham khảo:
- AWS Secrets Manager Rotation – Hỗ trợ RDS rotation tự động.
- RDS Password Management with Secrets Manager.
- Best Practices for Managing Secrets.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Store the database credentials in AWS Secrets Manager. Configure automatic rotation for the secret every 365 days.
Lý do 🛠️:
- AWS Secrets Manager là dịch vụ native hỗ trợ rotation tự động hoàn chỉnh cho RDS: Nó lưu trữ credentials, tạo Lambda rotation function tự động (built-in template cho RDS), thay đổi password trực tiếp trên RDS instance (update master password), và cập nhật secret mới mà không gây downtime.
- Hiệu quả vận hành cao nhất: Chỉ cần cấu hình rotation schedule 365 ngày qua console/API/CLI. Không code, scaling tự động cho nhiều RDS instances, tích hợp IAM fine-grained access, audit trail qua CloudTrail.
- Tuân thủ hàng năm: Đáp ứng chính xác "at least annually" với cron schedule linh hoạt (ví dụ:
rate(365 days)). - So với các option khác, đây là least effort, most reliable theo AWS Well-Architected Framework (Security Pillar).
📋 Giải thích tất cả các phương án (đúng/sai)
-
✅ Store the database credentials in AWS Secrets Manager. Configure automatic rotation for the secret every 365 days.
🛠️ Đúng vì: Như phân tích trên, đây là giải pháp native, zero-custom-code của AWS. Rotation Lambda được Secrets Manager tự tạo/deploy, kết nối trực tiếp RDS qua endpoint, hỗ trợ multi-Region, VPC. ✅ Hoàn hảo cho compliance quy mô lớn! -
❌ Store the database credentials as a parameter in the RDS parameter group. Create a database trigger to rotate the password every 365 days.
❌ Sai vì: RDS parameter group không lưu trữ credentials (chỉ parameters như timeout, charset). Database trigger (PL/SQL/PostgreSQL trigger) chạy bên trong DB, không thể thay đổi master password (chỉ user-defined), gây downtime/security risk, và không tự động hóa ngoài DB. Không efficient, vi phạm least privilege! -
❌ Store the database credentials in a private Amazon S3 bucket. Schedule an AWS Lambda function to generate a new set of credentials every 365 days.
❌ Sai vì: S3 chỉ lưu object, không phải secret store native. Cần custom Lambda (code generate password, connect RDSALTER USER, update S3) với EventBridge schedule, phức tạp, dễ lỗi (networking, IAM roles), không audit tốt, và không zero-downtime. Ít efficient hơn Secrets Manager! -
❌ Store the database credentials in AWS Systems Manager Parameter Store as a secure string parameter. Configure automatic rotation for the parameter every 365 days.
❌ Sai vì: Parameter Store hỗ trợ SecureString nhưng KHÔNG có rotation tự động built-in cho RDS (chỉ lưu trữ, cần custom Lambda riêng để rotate DB password). Không tích hợp trực tiếp như Secrets Manager, phải code thêm → ít efficient hơn, dù rẻ hơn (nhưng câu hỏi ưu tiên operationally efficient, không phải cost). AWS docs xác nhận chỉ Secrets Manager rotate RDS native!
🧠 Kết luận: Secrets Manager là "gold standard" cho RDS password rotation theo AWS 2026 best practices. Nếu deploy, dùng CLI: aws secretsmanager create-secret --name MyRDS --secret-string '{"username":"admin","password":"oldpass"}' --rotation-lambda-arn <built-in> --rotation-rules '{"ScheduleExpression":"rate(365 days)"}'.
What change should the systems administrator make to the existing build fleet to comply with this new requirement?
- A Move all of the EC2 instances behind a NAT gateway and provide the gateway IP address to the service.
- B Move all of the EC2 instances behind an internet gateway and provide the gateway IP address to the service.
- C Move all of the EC2 instances into a single Availability Zone and provide the Availability Zone IP address to the service.
- D Move all of the EC2 instances to a peered VPC and provide the VPC IP address to the service.
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 vấn đề quản lý fleet Amazon EC2 instances 🛠️:
Một SysOps administrator đang quản lý nhiều EC2 instances dùng để upload build artifacts lên dịch vụ bên thứ ba (third-party service). Dịch vụ này mới áp dụng strict IP allow list, yêu cầu tất cả uploads phải đến từ một địa chỉ IP duy nhất (single IP address).
Mục tiêu: Thay đổi cấu hình fleet EC2 hiện tại để tuân thủ yêu cầu này mà không làm gián đoạn hoạt động.
- Bối cảnh AWS: EC2 instances thường nằm trong VPC (Virtual Private Cloud). Nếu instances ở public subnet, mỗi instance có public IP riêng → không đáp ứng single IP. Nếu ở private subnet, outbound traffic qua NAT Gateway để có IP chung.
- Yêu cầu cốt lõi: Cần một giải pháp cung cấp public IP tĩnh, duy nhất cho tất cả outbound traffic từ fleet đến internet/third-party service.
(Kiến thức cập nhật 2026: AWS VPC vẫn giữ nguyên cơ chế NAT Gateway với Elastic IP - EIP - cho single static public IP outbound, theo AWS VPC User Guide phiên bản mới nhất). 📘
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Move all of the EC2 instances behind a NAT gateway and provide the gateway IP address to the service.
Lý do chi tiết 🛠️:
- NAT Gateway (NAT GW) được thiết kế chính xác cho outbound traffic từ private subnets ra internet, sử dụng một Elastic IP (EIP) tĩnh duy nhất làm nguồn IP public. Tất cả EC2 instances (trong private subnet) khi upload sẽ "mượn" IP này → third-party service chỉ cần whitelist IP của NAT GW.
- Lợi ích: Không cần thay đổi public IP của instances, dễ scale fleet, high availability (one NAT GW per AZ), và tuân thủ best practice bảo mật (instances giữ private IP).
- Cách triển khai: Di chuyển instances vào private subnet, attach NAT GW vào public subnet route table (0.0.0.0/0 → NAT GW), cung cấp EIP của NAT GW cho service.
(Nguồn: AWS Documentation - NAT Gateways: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html | AWS Well-Architected Framework - Reliability Pillar, cập nhật 2024+).
📋 Giải thích tất cả các phương án (đúng/sai)
-
Move all of the EC2 instances behind a NAT gateway and provide the gateway IP address to the service.
✅ Đúng 🟢: Như giải thích trên, NAT Gateway cung cấp single static public IP (EIP) cho toàn bộ outbound traffic từ private instances. Đây là giải pháp chuẩn AWS cho trường hợp IP allow list strict, đảm bảo scalability và bảo mật cao nhất. -
Move all of the EC2 instances behind an internet gateway and provide the gateway IP address to the service.
❌ Sai 🔴: Internet Gateway (IGW) chỉ route traffic cho public subnets, không masquerade IP. Mỗi EC2 instance vẫn dùng public IP riêng (hoặc EIP riêng) → fleet có nhiều IP khác nhau, không đáp ứng single IP. IGW không có IP public cố định để whitelist. -
Move all of the EC2 instances into a single Availability Zone and provide the Availability Zone IP address to the service.
❌ Sai 🔴: Availability Zone (AZ) không có IP address duy nhất để whitelist. Instances trong cùng AZ vẫn có public IP riêng biệt, và AZ chỉ là logical grouping geography → không giải quyết vấn đề multi-IP. Ngoài ra, tập trung single AZ vi phạm high availability best practice. -
Move all of the EC2 instances to a peered VPC and provide the VPC IP address to the service.
❌ Sai 🔴: VPC Peering cho phép giao tiếp private giữa 2 VPC, không phải outbound internet/single public IP. VPC không có public IP duy nhất cho service bên ngoài; traffic vẫn qua IGW/NAT của từng VPC → vẫn multi-IP, không liên quan đến third-party IP allow list.
Kết luận 🎯: Giải pháp NAT Gateway là optimal, scalable và AWS-native cho DevOps workflow như CI/CD builds. Nếu fleet lớn, dùng NAT Gateway Multi-AZ với Auto Scaling để HA. (Tham khảo thêm: AWS SysOps Admin Guide - DOP-C02 exam blueprint, phần Networking & Content Delivery).
Which solution will meet these requirements?
- A Create an Amazon OpenSearch Service (Amazon Elasticsearch Service) domain with internet access and server-side encryption that uses the default AWS managed customer master key (CMK). Configure CloudFront to use the Amazon OpenSearch Service (Amazon Elasticsearch Service) domain as a log destination.
- B Create an Amazon OpenSearch Service (Amazon Elasticsearch Service) domain with VPC access and server-side encryption that uses AES-256. Configure CloudFront to use the Amazon OpenSearch Service (Amazon Elasticsearch Service) domain as a log destination.
- C Create an Amazon S3 bucket that is configured with default server-side encryption that uses AES-256. Configure CloudFront to use the S3 bucket as a log destination.
- D Create an Amazon S3 bucket that is configured with no default encryption. Enable encryption in the CloudFront distribution, and use the S3 bucket as a log destination.
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 việc lưu trữ tập trung (centrally stored) các traffic logs từ Amazon CloudFront distribution dùng để phân phối website, đồng thời tất cả dữ liệu phải được mã hóa tại chỗ (encrypted at rest).
- CloudFront traffic logs: Đây là các log chuẩn (standard logs) ghi lại thông tin truy cập edge location, bao gồm thời gian, IP, URI yêu cầu, v.v. Logs này được CloudFront tự động tạo và gửi đến đích lưu trữ.
- Yêu cầu chính 🛡️️:
- Lưu trữ tập trung (centralized, ví dụ: một bucket hoặc domain duy nhất).
- Mã hóa tại chỗ cho toàn bộ dữ liệu (server-side encryption).
- Phiên bản AWS cập nhật 2026 📘: CloudFront chỉ hỗ trợ gửi standard logs trực tiếp đến Amazon S3 bucket (không hỗ trợ trực tiếp OpenSearch). Real-time logs có thể dùng Kinesis Data Firehose, nhưng câu hỏi ám chỉ standard traffic logs. Mã hóa S3 mặc định dùng SSE-S3 (AES-256) là đủ và đơn giản nhất.
Nguồn tham khảo:
- AWS CloudFront Developer Guide: Access Logs (cập nhật 2025).
- Amazon S3 Server-Side Encryption.
✅ Đáp án đúng
Create an Amazon S3 bucket that is configured with default server-side encryption that uses AES-256. Configure CloudFront to use the S3 bucket as a log destination.
Lý do lựa chọn 🏆:
- CloudFront hỗ trợ gửi logs trực tiếp đến S3 bucket một cách dễ dàng qua console/CLI/API.
- SSE-S3 (AES-256) là mã hóa mặc định (default server-side encryption) miễn phí, tự động áp dụng cho tất cả objects mới, đáp ứng encrypted at rest mà không cần CMK.
- Giải pháp đơn giản, tập trung, chi phí thấp, phù hợp best practice AWS Well-Architected Framework (Reliability & Security pillars).
🔍 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 theo thứ tự (A, B, C, D). Tôi giữ nguyên văn bản gốc tiếng Anh, chỉ giải thích bằng tiếng Việt với lý do đúng/sai dựa trên tính khả dụng và yêu cầu.
-
❌ Phương án A (SAI):
Create an Amazon OpenSearch Service (Amazon Elasticsearch Service) domain with internet access and server-side encryption that uses the default AWS managed customer master key (CMK). Configure CloudFront to use the Amazon OpenSearch Service (Amazon Elasticsearch Service) domain as a log destination.
Giải thích sai: CloudFront không hỗ trợ cấu hình OpenSearch/Elasticsearch làm đích logs trực tiếp (chỉ S3 cho standard logs). Dù domain có internet access và SSE với AWS-managed CMK (đúng về mã hóa), nhưng tính khả dụng không tồn tại → không đáp ứng yêu cầu. -
❌ Phương án B (SAI):
Create an Amazon OpenSearch Service (Amazon Elasticsearch Service) domain with VPC access and server-side encryption that uses AES-256. Configure CloudFront to use the Amazon OpenSearch Service (Amazon Elasticsearch Service) domain as a log destination.
Giải thích sai: Tương tự A, CloudFront không thể gửi logs trực tiếp đến OpenSearch (VPC hay không). AES-256 là mã hóa tốt (tương đương SSE-S3), nhưng thiếu tích hợp → giải pháp không khả thi, dù có mã hóa. -
✅ Phương án C (ĐÚNG):
Create an Amazon S3 bucket that is configured with default server-side encryption that uses AES-256. Configure CloudFront to use the S3 bucket as a log destination.
Giải thích đúng: Hoàn hảo! S3 bucket với default SSE-S3 (AES-256) mã hóa tự động tất cả dữ liệu tại chỗ. CloudFront hỗ trợ đầy đủ gửi logs đến S3 (grant permission qua bucket policy). Lưu trữ tập trung, an toàn, scalable. -
❌ Phương án D (SAI):
Create an Amazon S3 bucket that is configured with no default encryption. Enable encryption in the CloudFront distribution, and use the S3 bucket as a log destination.
Giải thích sai: CloudFront không có tính năng mã hóa logs khi gửi đến S3 (encryption chỉ xử lý trên S3 side, không phải CloudFront). Bucket "no default encryption" → dữ liệu không được mã hóa at rest → vi phạm yêu cầu. Phải dùng default encryption trên S3.
Kết luận 🎯: Giải pháp C là optimal theo AWS best practices. Nếu cần query logs nâng cao, có thể kết hợp Athena/S3 sau khi lưu trữ!
How can this be resolved?
- A Enable encryption on each host's connection to the Amazon EFS volume. Each connection must be recreated for encryption to take effect.
- B Enable encryption on the existing EFS volume by using the AWS Command Line Interface.
- C Enable encryption on each host's local drive. Restart each host to encrypt the drive.
- D Enable encryption on a newly created volume and copy all data from the original volume. Reconnect each host to the new volume.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh một tình huống thực tế trong AWS: Tổ chức đã tạo một Amazon Elastic File System (EFS) volume với ID fs-85ba41fc, và volume này đang được 10 host Amazon EC2 sử dụng tích cực. Họ lo ngại vì file system chưa được mã hóa (not encrypted), và cần tìm cách giải quyết vấn đề này một cách hiệu quả.
📘 Chi tiết kỹ thuật cần nắm:
- Amazon EFS là dịch vụ lưu trữ file chia sẻ, hỗ trợ nhiều AZ, và có hai loại mã hóa chính: Encryption at rest (mã hóa dữ liệu khi lưu trữ, sử dụng KMS keys) và Encryption in transit (mã hóa dữ liệu truyền giữa EC2 và EFS qua TLS 1.2+).
- Vấn đề cốt lõi: EFS không hỗ trợ bật mã hóa at rest trên volume đang tồn tại. Phải tạo volume mới với mã hóa enabled từ đầu (theo docs AWS cập nhật đến 2026, không có thay đổi này).
- Mục tiêu: Migrate dữ liệu mà không gián đoạn lớn, đảm bảo 10 EC2 hosts kết nối lại được.
🛠️ Kiến thức cập nhật AWS (2026): EFS phiên bản mới nhất vẫn yêu cầu tạo mới để enable encryption at rest. Có thể dùng rsync, AWS DataSync hoặc EFS-to-EFS replication để copy data nhanh chóng.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Enable encryption on a newly created volume and copy all data from the original volume. Reconnect each host to the new volume.
Lý do 🟢:
- Đây là phương pháp chính thức được AWS khuyến nghị để enable encryption at rest trên EFS. Tạo volume mới với
--encryptionhoặc qua console (bật "Enable automatic backups and encryption"), sau đó copy toàn bộ data từ volume cũ sang mới (sử dụng rsync qua EC2 mount point, AWS DataSync, hoặc EFS Replication). - Không gián đoạn lớn: Copy data trong lúc volume cũ vẫn hoạt động, sau đó update mount targets trên 10 EC2 hosts (chỉnh /etc/fstab hoặc automount).
- An toàn và scalable: Hỗ trợ cho production với 10+ hosts, đảm bảo compliance (ví dụ: PCI DSS, HIPAA yêu cầu encryption).
- Thời gian: Với throughput mode Provisioned, copy nhanh; test downtime chỉ vài phút khi switch.
📚 Tài liệu tham khảo:
- AWS EFS Encryption Docs (cập nhật 2024-2026).
- Migrating to Encrypted EFS.
- AWS Well-Architected Framework: Security Pillar.
❌ Phân tích tất cả các phương án
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên nội dung gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên docs AWS mới nhất.
-
[SAI] Enable encryption on each host's connection to the Amazon EFS volume. Each connection must be recreated for encryption to take effect.
❌ Lý do sai: Chỉ enable encryption in transit (TLS), không phải at rest. EFS mặc định TLS 1.2+ từ 2017, không cần recreate connection. Không giải quyết vấn đề mã hóa dữ liệu lưu trữ. Recreation gây downtime không cần thiết cho 10 hosts. -
[SAI] Enable encryption on the existing EFS volume by using the AWS Command Line Interface.
❌ Lý do sai: Không thể modify encryption trên EFS existing qua CLI (aws efs update-file-system --encryption-enabled ❌). Lệnhcreate-file-systemmới hỗ trợ--encryption. AWS docs rõ: "You can't enable encryption at rest after file system creation." -
[SAI] Enable encryption on each host's local drive. Restart each host to encrypt the drive.
❌ Lý do sai: Đây là mã hóa local EBS volume của EC2, không liên quan đến EFS shared storage. Restart 10 hosts gây downtime lớn, và data vẫn không mã hóa trên EFS. Phù hợp cho instance storage, không phải file system chia sẻ. -
[ĐÚNG] Enable encryption on a newly created volume and copy all data from the original volume. Reconnect each host to the new volume.
✅ Lý do đúng (như phần trên): Phương pháp chuẩn, zero-downtime gần như, hỗ trợ tools như DataSync cho petabyte-scale migration.
🧠 Lời khuyên DevOps Professional: Trong thực tế, dùng blue-green deployment: Mount cả hai volume song song trên EC2 test, rsync data với --checksum, validate integrity (md5sum), rồi cutover. Monitor với CloudWatch EFS metrics (PermittedThroughput, BurstCredit). Nếu production lớn, dùng AWS DMS hoặc Lambda automation script! 🚀
What is the MOST operationally efficient way to meet this requirement?
- A Create an AWS CloudFormation template to use the AWS Service Catalog portfolio in the new AWS account.
- B In the new AWS account, manually create an AWS Service Catalog portfolio that duplicates the original portfolio.
- C Run an AWS Lambda function to create a new AWS Service Catalog portfolio based on the output of the DescribePortfolio API operation.
- D Share the AWS Service Catalog portfolio with the new AWS account. Import the portfolio into the new AWS account.
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 tái tạo (replica) cơ sở hạ tầng AWS hiện tại của một công ty trong một AWS account mới. Công ty đang sử dụng AWS Service Catalog portfolio để tạo và quản lý tài nguyên (như EC2, RDS, VPC...). Vai trò của SysOps administrator là tìm cách hiệu quả nhất về mặt vận hành (MOST operationally efficient) để đạt yêu cầu này.
🛠️ Yêu cầu cốt lõi:
- Không chỉ copy portfolio metadata, mà phải đảm bảo account mới có thể provision (tạo) tài nguyên giống hệt infrastructure gốc một cách tự động và dễ quản lý.
- Tránh các phương pháp thủ công tốn thời gian, dễ lỗi.
- Sử dụng tính năng native của AWS Service Catalog (cập nhật đến 2026: hỗ trợ sharing qua AWS Resource Access Manager - RAM và AWS Organizations cho cross-account sharing).
📘 Kiến thức nền tảng (AWS mới nhất 2026): AWS Service Catalog cho phép share portfolio cross-account mà không cần recreate từ đầu, giữ nguyên products, constraints, và launch permissions. Điều này là cách IaC (Infrastructure as Code) chuẩn cho DevOps.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Share the AWS Service Catalog portfolio with the new AWS account. Import the portfolio into the new AWS account.
Lý do chi tiết:
- Đây là cách hiệu quả nhất vì native feature của AWS Service Catalog: Sử dụng AWS RAM hoặc AWS Organizations để share portfolio trực tiếp với account mới.
- Account mới chỉ cần import (thông qua Service Catalog console/API) để có portfolio giống hệt, bao gồm tất cả products, product versions, constraints, và principals.
- Operationally efficient: Không code thủ công, không export/import template, giảm thời gian từ giờ xuống phút, dễ maintain/scaling, phù hợp DevOps best practice (zero-downtime replication).
- Kết quả: Account mới có thể launch products giống infrastructure gốc mà không thay đổi gì.
🧩 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, dựa trên tài liệu AWS chính thức (Service Catalog Admin Guide 2026):
-
❌ Create an AWS CloudFormation template to use the AWS Service Catalog portfolio in the new AWS account.
Sai vì: Phương pháp này yêu cầu tạo CloudFormation template từ portfolio (sử dụngaws-servicecatalog-provisioned-productresource), nhưng chỉ copy provisioned products đã deploy, không phải toàn bộ portfolio definition (products chưa launch). Không replicate infrastructure đầy đủ (như constraints, sharing rules), tốn công export/import, không efficient so với native sharing. -
❌ In the new AWS account, manually create an AWS Service Catalog portfolio that duplicates the original portfolio.
Sai vì: Hoàn toàn thủ công (tạo products, constraints, versions thủ công qua console/API), dễ lỗi, mất thời gian dài (giờ/ngày), không scalable. Vi phạm nguyên tắc "operationally efficient" vì không tận dụng automation/IaC của AWS. -
❌ Run an AWS Lambda function to create a new AWS Service Catalog portfolio based on the output of the DescribePortfolio API operation.
Sai vì:DescribePortfolioAPI chỉ trả metadata cơ bản (ID, name, description), không đầy đủ để recreate products/versions/constraints. Lambda phải code phức tạp thêm (loop quaDescribeProduct,ListConstraints...), dễ fail, không idempotent, và vẫn kém efficient hơn share native (phải handle errors, permissions cross-account). -
✅ Share the AWS Service Catalog portfolio with the new AWS account. Import the portfolio into the new AWS account.
Đúng vì: Như đã giải thích ở trên – one-click sharing qua RAM/Organizations, import tự động sync toàn bộ portfolio. Hỗ trợ cross-Region nếu cần, giữ nguyên governance (launch constraints). Best practice cho multi-account strategy (AWS Landing Zone).
📘 Tài liệu tham khảo (AWS cập nhật 2026)
- AWS Service Catalog Sharing Portfolios: docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios_sharing.html – Hướng dẫn share/import chi tiết.
- AWS RAM for Service Catalog: docs.aws.amazon.com/ram/latest/userguide/servicecatalog.html – Tích hợp RAM từ 2020, ổn định đến 2026.
- AWS Well-Architected Framework (Ops Pillar): Nhấn mạnh sharing cho efficiency aws.amazon.com/architecture/well-architected.
- Exam Prep DOP-C02: Portfolio sharing là key topic trong Service Catalog multi-account.
Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần demo code Terraform/CLI, hãy hỏi thêm nhé.
The SysOps administrator must identify anything that was changed by using this access key.
How should the SysOps administrator meet these requirements?
- A Create an Amazon EventBridge (Amazon CloudWatch Events) rule to send all IAM events to an AWS Lambda function for analysis.
- B Query Amazon EC2 logs by using Amazon CloudWatch Logs Insights for all events initiated with the compromised access key within the suspected timeframe.
- C Search AWS CloudTrail event history for all events initiated with the compromised access key within the suspected timeframe.
- D Search VPC Flow Logs for all events initiated with the compromised access key within the suspected timeframe.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi này xoay quanh tình huống bảo mật AWS khi một access key của IAM user bị lộ (uploaded nhầm lên repository code công khai). Vai trò của SysOps administrator là phải xác định tất cả các thay đổi (actions) đã được thực hiện bởi key này để đánh giá thiệt hại và khắc phục.
📌 Yêu cầu chính: Tìm kiếm lịch sử sự kiện (event history) liên quan đến key bị compromise trong khoảng thời gian nghi ngờ (suspected timeframe). Đây là kịch bản điển hình trong incident response cho IAM security, nơi cần audit API calls đã được thực hiện bởi key cụ thể. AWS cung cấp các công cụ logging để trace theo userIdentity (bao gồm accessKeyId).
🛠️ Bối cảnh AWS cập nhật đến 2026: AWS CloudTrail là dịch vụ chuẩn để log management events (API calls IAM, EC2, S3,...), hỗ trợ tra cứu nhanh qua CloudTrail Lake hoặc Lake Query Editor (tính năng mới từ 2023-2026, cho phép query SQL trên petabyte-scale logs).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Search AWS CloudTrail event history for all events initiated with the compromised access key within the suspected timeframe.
Lý do chi tiết:
- 🛡️ AWS CloudTrail ghi lại tất cả API calls (management và data events nếu enable) với chi tiết userIdentity bao gồm accessKeyId của IAM user.
- Có thể tìm kiếm trực tiếp trong Event history (giao diện console) hoặc CloudTrail Lake bằng filter theo accessKeyId và timeframe (lưu trữ 90 ngày miễn phí cho event history, 7 năm cho trails).
- Đây là cách chuẩn và nhanh nhất cho incident response, không cần setup thêm, phù hợp với best practices AWS Security (ví dụ: NIST framework integration).
- Cập nhật 2026: CloudTrail hỗ trợ query nhanh qua Athena hoặc Lake Query Editor với syntax như
userIdentity.accessKeyId = 'compromised-key'.
🔍 Phân tích tất cả các phương án trả lời
-
Create an Amazon EventBridge (Amazon CloudWatch Events) rule to send all IAM events to an AWS Lambda function for analysis.
❌ Sai vì: EventBridge (nay là Amazon EventBridge) dùng cho real-time event routing từ CloudWatch Events hoặc CloudTrail, không phải để tra cứu lịch sử sự kiện đã xảy ra. Nó forward events tương lai đến Lambda, không scan retroactively (hồi tố). Phải setup trước khi incident, không giải quyết vấn đề ngay lập tức. Không hiệu quả cho IAM events historical. -
Query Amazon EC2 logs by using Amazon CloudWatch Logs Insights for all events initiated with the compromised access key within the suspected timeframe.
❌ Sai vì: CloudWatch Logs Insights chỉ query logs từ EC2 instances (như CloudWatch Agent logs), không ghi AWS API calls từ IAM access key. EC2 logs tập trung vào metrics/performance instance, không trace service-level actions (ví dụ: S3 delete, IAM policy changes). Không liên quan đến global API auditing. -
Search AWS CloudTrail event history for all events initiated with the compromised access key within the suspected timeframe.
✅ Đúng vì: Như giải thích ở trên, CloudTrail là nguồn chính thức cho audit trail của tất cả API actions với userIdentity details (accessKeyId). Filter dễ dàng qua console, CLI (aws cloudtrail lookup-events), hoặc queries nâng cao. Best practice cho security incident response (AWS Well-Architected Security Pillar). -
Search VPC Flow Logs for all events initiated with the compromised access key within the suspected timeframe.
❌ Sai vì: VPC Flow Logs chỉ ghi network traffic (IP, port, bytes) giữa EC2/VPC resources, không trace API calls hoặc IAM identity. Không chứa accessKeyId hay service-level events (như S3 access). Dùng cho network troubleshooting, không phải API auditing.
📘 Tài liệu tham khảo (AWS cập nhật mới nhất 2026)
- AWS CloudTrail User Guide: CloudTrail Event History – Hướng dẫn filter by accessKeyId.
- AWS Security Best Practices: Investigating Compromised Credentials – Khuyến nghị dùng CloudTrail đầu tiên.
- CloudTrail Lake Documentation (mới 2023+): Query Events with SQL – Tính năng query petabyte-scale logs.
- AWS Well-Architected Framework - Security Pillar (2024): Nhấn mạnh CloudTrail cho detective controls.
🛡️ Lời khuyên thực tế: Sau khi tìm, rotate key ngay lập tức, enable MFA, và setup CloudTrail trails đầy đủ + CloudWatch alarms cho suspicious activities!