Ngân hàng đề — AWS Certified SysOps Administrator Associate
Tìm thấy 936 câu.
What is the MOST operationally efficient solution that meets these requirements?
- A Create an Amazon CloudWatch alarm for the StatusCheckFailed_System metric to invoke an AWS Lambda function that stops and starts the EC2 instance.
- B Create an Amazon RDS for MySQL Multi-AZ DB instance. Use a MySQL native backup that is stored in Amazon S3 to restore the data to the new database. Update the connection string in the web application.
- C Create an Amazon RDS for MySQL Single-AZ DB instance with a read replica. Use a MySQL native backup that is stored in Amazon S3 to restore the data to the new database. Update the connection string in the web application
- D Use Amazon Data Lifecycle Manager (Amazon DLM) to take a snapshot of the Amazon Elastic Block Store (Amazon EBS) volume every hour. In the event of an EC2 instance failure, restore the EBS volume from a snapshot.
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 một ứng dụng web có tầng database chạy trên Amazon EC2 instance với MySQL tự quản lý. SysOps administrator cần tìm giải pháp hiệu quả nhất về mặt vận hành (MOST operationally efficient) để giảm thiểu mất dữ liệu tiềm ẩn (minimize potential data loss) và thời gian khôi phục (recovery time) khi xảy ra sự cố database failure (như hỏng hardware, crash instance).
Hiện tại, setup EC2 + MySQL là self-managed, không có tính sẵn sàng cao (high availability - HA), backup thủ công, nên RPO (Recovery Point Objective: dữ liệu mất) và RTO (Recovery Time Objective: thời gian khôi phục) cao. Giải pháp lý tưởng phải tự động hóa cao, managed service, hỗ trợ failover nhanh, backup tự động/point-in-time recovery (PITR), và migrate dễ dàng từ EC2 sang (dùng native backup MySQL như mysqldump lưu S3).
Mục tiêu cốt lõi: Chuyển sang dịch vụ managed như RDS để AWS lo HA, backup, scaling, giảm công vận hành.
✅ Đáp án đúng và lý do lựa chọn
Create an Amazon RDS for MySQL Multi-AZ DB instance. Use a MySQL native backup that is stored in Amazon S3 to restore the data to the new database. Update the connection string in the web application.
Lý do:
- RDS Multi-AZ (cập nhật 2024-2026: hỗ trợ synchronous standby replica ở AZ khác) cung cấp failover tự động dưới 120 giây nếu primary failure, RPO gần 0 (sync replication), RTO thấp. Automated backups + PITR giúp khôi phục nhanh mà không mất dữ liệu xa.
- Migrate từ EC2: Dùng MySQL native backup (mysqldump) lưu S3 → import vào RDS mới → update connection string đơn giản. Đây là quy trình operationally efficient (ít bước thủ công lâu dài), AWS managed sau migrate.
- Tối ưu nhất: Giảm data loss (nhờ Multi-AZ sync), recovery nhanh (failover auto + PITR), ít vận hành so với self-managed EBS snapshots hay read replicas.
- Không cần custom scripting, phù hợp DevOps best practice.
🔍 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. Tôi giữ nguyên văn bản gốc tiếng Anh của phương án, đánh dấu ✅/❌, và giải thích hoàn toàn bằng tiếng Việt dựa trên kiến thức AWS mới nhất (RDS Multi-AZ DB instance v14+, EBS snapshots với DLM).
-
Create an Amazon CloudWatch alarm for the StatusCheckFailed_System metric to invoke an AWS Lambda function that stops and starts the EC2 instance.
❌ Sai: Chỉ restart instance khi StatusCheckFailed (hardware issue), nhưng không backup dữ liệu, không giảm data loss (nếu MySQL corruption). Recovery chỉ fix instance, không HA thực sự. Không efficient vì vẫn self-managed, Lambda chỉ temp fix, RTO cao nếu data corrupt. -
Create an Amazon RDS for MySQL Multi-AZ DB instance. Use a MySQL native backup that is stored in Amazon S3 to restore the data to the new database. Update the connection string in the web application.
✅ Đúng (như đã giải thích trên): Managed HA tốt nhất, failover auto, PITR, migrate đơn giản. Giảm tối đa data loss/recovery time so với các option self-managed hoặc Single-AZ. -
Create an Amazon RDS for MySQL Single-AZ DB instance with a read replica. Use a MySQL native backup that is stored in Amazon S3 to restore the data to the new database. Update the connection string in the web application.
❌ Sai: Single-AZ không failover auto (chỉ 1 instance), read replica chỉ read-only, không promote tự động cho write (phải manual promotion, downtime cao). Vẫn cần restore manual từ S3, RTO cao hơn Multi-AZ, không minimize data loss/recovery hiệu quả. -
Use Amazon Data Lifecycle Manager (Amazon DLM) to take a snapshot of the Amazon Elastic Block Store (Amazon EBS) volume every hour. In the event of an EC2 instance failure, restore the EBS volume from a snapshot.
❌ Sai: DLM snapshots EBS hourly chỉ cho RPO 1 giờ (mất dữ liệu 1h gần nhất), restore manual (attach EBS mới vào EC2, reinstall MySQL) → RTO hàng giờ, không HA. Vẫn self-managed, tốn công vận hành, kém efficient so với RDS managed.
📘 Tài liệu tham khảo (AWS docs cập nhật 2024-2026)
- 🛠️ RDS Multi-AZ Deployments: AWS RDS Multi-AZ Documentation – Failover <120s, sync replication.
- 🧩 Migrate MySQL to RDS: Migrating MySQL databases to Amazon RDS – Native backup via S3.
- 📘 DLM & EBS Snapshots: Amazon Data Lifecycle Manager.
- 🔗 Best Practices SysOps: AWS Well-Architected Framework – Reliability Pillar (Reliability Pillar khuyến nghị managed DB cho HA).
Giải pháp này giúp DevOps automation, giảm toil! 🚀
Which solution will meet these requirements?
- A Set the DeletionPolicy attribute to Snapshot for the EC2 instance resource in the CloudFormation template.
- B Automate backups by using Amazon Data Lifecycle Manager (Amazon DLM).
- C Create a backup plan in AWS Backup.
- D Set the DeletionPolicy attribute to Retain for the EC2 instance resource in the CloudFormation template.
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 quản lý tài nguyên AWS CloudFormation với một stack chứa các Amazon EC2 instances. Một SysOps administrator cần đảm bảo rằng các EC2 instances và toàn bộ dữ liệu của chúng được giữ nguyên ngay cả khi ai đó xóa (delete) stack.
✅ Yêu cầu chính: Không chỉ backup dữ liệu mà phải giữ nguyên toàn bộ instances (bao gồm cả dữ liệu trên EBS volumes attached), tránh tình trạng instances bị terminate khi stack bị xóa. Đây là tình huống phổ biến trong DevOps để tránh mất mát dữ liệu do thao tác nhầm lẫn.
🛠️ Ngữ cảnh AWS mới nhất (2026): CloudFormation hỗ trợ DeletionPolicy để kiểm soát hành vi xóa tài nguyên. Không có thay đổi lớn trong tính năng này từ các phiên bản trước; Retain vẫn là cách chuẩn để giữ nguyên resources độc lập với stack.
✅ Đáp án đúng: Set the DeletionPolicy attribute to Retain for the EC2 instance resource in the CloudFormation template.
Lý do chọn đáp án này:
- DeletionPolicy: Retain sẽ giữ nguyên hoàn toàn EC2 instance (bao gồm instance ID, configuration và tất cả EBS volumes attached) khi stack bị delete. Instance sẽ được detach khỏi stack nhưng vẫn chạy độc lập trong tài khoản AWS, không bị terminate.
- Điều này đáp ứng chính xác yêu cầu: giữ instances và data mà không cần backup thủ công hay công cụ bên ngoài.
- Ví dụ YAML trong template:
Resources: MyEC2Instance: Type: AWS::EC2::Instance DeletionPolicy: Retain ...
📋 Giải thích chi tiết từng phương án
-
Set the DeletionPolicy attribute to Snapshot for the EC2 instance resource in the CloudFormation template.
❌ Sai: DeletionPolicy: Snapshot chỉ tạo snapshot của EBS volumes attached với EC2 instance, nhưng instance itself sẽ bị terminate khi stack delete. Không giữ nguyên instances (chỉ backup volumes), dẫn đến mất instance và cần recreate từ snapshot. Không đáp ứng yêu cầu giữ "instances and all of the instances’ data" đầy đủ. -
Automate backups by using Amazon Data Lifecycle Manager (Amazon DLM).
❌ Sai: Amazon DLM dùng để tự động hóa snapshot EBS volumes theo lịch, nhưng không ngăn chặn việc terminate EC2 instances khi delete stack. Đây chỉ là backup định kỳ, không giữ nguyên runtime state của instances (như processes đang chạy), và không liên kết trực tiếp với lifecycle của CloudFormation stack. -
Create a backup plan in AWS Backup.
❌ Sai: AWS Backup hỗ trợ backup toàn diện EC2 (bao gồm EBS và AMIs), nhưng vẫn cho phép stack delete terminate instances. Backup chỉ dùng để restore sau, không giữ nguyên instances đang chạy. Phù hợp cho disaster recovery chứ không phải "keep even if someone deletes the stack". -
Set the DeletionPolicy attribute to Retain for the EC2 instance resource in the CloudFormation template.
✅ Đúng: Như đã giải thích ở trên, đây là giải pháp chuẩn và trực tiếp nhất từ CloudFormation, giữ nguyên 100% instances + data mà không cần tool backup ngoài.
📘 Tài liệu tham khảo (AWS Docs cập nhật 2026)
- AWS CloudFormation User Guide - DeletionPolicy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html (Giải thích Retain vs Snapshot chi tiết).
- AWS::EC2::Instance Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html (Hỗ trợ DeletionPolicy).
- AWS Well-Architected Framework - Reliability Pillar: Khuyến nghị sử dụng DeletionPolicy để tránh mất mát tài nguyên trong production.
🛡️ Lưu ý DevOps Pro: Trong thực tế DOP-C02 exam, ưu tiên native CloudFormation attributes trước các dịch vụ backup để tối ưu chi phí và đơn giản hóa!
Which solution meets these requirements?
- A Create an Amazon CloudWatch alarm to monitor Service Quotas. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
- B Create an AWS Config rule to monitor Service Quotas. Call an AWS Lambda function to remediate the action and increase the quota.
- C Create an Amazon CloudWateh alarm to monitor the AWS Health Dashboard. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
- D Create an Amazon CloudWatch alarm to monitor AWS Trusted Advisor service quotas. Configure the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic to increase the quota.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi yêu cầu một giải pháp để giám sát số lượng Amazon EC2 instances đang chạy và tự động hóa việc tăng service quota khi số lượng instances đạt ngưỡng cụ thể.
✅ Yêu cầu chính:
- Giám sát số lượng EC2 instances (liên quan đến service quota của EC2, cụ thể là quota "Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances").
- Tự động tăng quota khi đạt threshold (sử dụng API của Service Quotas).
🛠️ Bối cảnh AWS (cập nhật đến 2026): Service Quotas cung cấp metrics trong Amazon CloudWatch (nhưServiceQuotaValuevàAppliedQuotaValue) để theo dõi quota hiện tại và sử dụng. Có thể thiết lập alarm trên metric này để trigger automation qua Lambda.
✅ Đáp án đúng
Create an Amazon CloudWatch alarm to monitor Service Quotas. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
Lý do chọn đáp án này 🏆:
- Service Quotas tích hợp trực tiếp với CloudWatch, cung cấp metric
ServiceQuotaValue(quota hiện tại) vàAppliedQuotaValue(quota đã áp dụng) cho EC2 instances. - Khi số lượng instances đạt threshold (ví dụ: gần quota), alarm kích hoạt Lambda function gọi API
RequestServiceQuotaIncreaseđể tự động yêu cầu tăng quota. - Giải pháp này đáp ứng đầy đủ yêu cầu giám sát và tự động hóa, scalable, serverless và tuân thủ best practices DevOps (IaC, event-driven).
📘 Tài liệu tham khảo: - AWS Service Quotas Documentation - Monitoring with CloudWatch (cập nhật 2025).
- CloudWatch Metrics for Service Quotas.
📋 Giải thích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn (giữ nguyên văn bản gốc bằng tiếng Anh). Tôi đánh dấu ✅ cho đúng và ❌ cho sai, kèm lý do cụ thể dựa trên tính năng AWS mới nhất.
-
Create an Amazon CloudWatch alarm to monitor Service Quotas. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
✅ Đúng: Như đã giải thích ở trên. Metric từ Service Quotas trong CloudWatch cho phép giám sát chính xác số lượng EC2 instances so với quota, và Lambda xử lý tăng quota tự động qua API. Hoàn hảo cho automation! -
Create an AWS Config rule to monitor Service Quotas. Call an AWS Lambda function to remediate the action and increase the quota.
❌ Sai: AWS Config rule dùng để kiểm tra compliance và configuration (như resource state, tags), không phải monitor metrics thời gian thực như service quota (quota là metric số lượng, không phải config). Remediation của Config không phù hợp cho quota increase (chỉ dùng cho fix config drift). Không đáp ứng giám sát real-time. -
Create an Amazon CloudWateh alarm to monitor the AWS Health Dashboard. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
❌ Sai (lưu ý lỗi chính tả "CloudWateh" nhưng giả sử là CloudWatch): AWS Health Dashboard cung cấp personalized health events (outages, maintenance), không có metric cho service quota như số EC2 instances. Không liên quan đến monitoring quota, dẫn đến alarm không trigger đúng. -
Create an Amazon CloudWatch alarm to monitor AWS Trusted Advisor service quotas. Configure the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic to increase the quota.
❌ Sai: AWS Trusted Advisor check quotas (recommendations), nhưng không publish metrics trực tiếp vào CloudWatch để tạo alarm (chỉ qua support notifications). SNS chỉ gửi thông báo, không tự động tăng quota (cần manual hoặc Lambda riêng). Không automate đầy đủ như yêu cầu.
Kết luận 🎯: Giải pháp đúng tận dụng CloudWatch + Service Quotas + Lambda – mô hình event-driven chuẩn AWS DevOps. Sử dụng AWS Console/CLI để deploy nhanh chóng! 🚀
The SysOps administrator wants to use AWS Systems Manager to reduce the number of hours the company spends on operating system patching each month.
Which combination of steps should the SysOps administrator take to meet these requirements? (Choose three.)
- A Group similar EC2 instances together into resource groups by using AWS Resource Groups.
- B Create a schedule in Systems Manager Patch Manager. Specify the appropriate resource group as the target.
- C Specify Systems Manager Automation runbooks to patch the operating systems. Register the runbooks as tasks in the maintenance window. Specify the appropriate resource group as the target.
- D Create a Systems Manager Automation runbook to monitor and control the state of the patches required. Apply the runbook to Systems Manager Patch Manager.
- E Create a single Systems Manager maintenance window for each resource group.
- F Configure Systems Manager Fleet Manager to apply a Systems Manager Automation runbook to the appropriate resource group.
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 quản lý hơn 50 instance Amazon EC2 trong một tài khoản AWS sản xuất duy nhất. Các instance này chạy nhiều hệ điều hành (OS) khác nhau, và công ty yêu cầu patch OS ít nhất một lần mỗi tháng. Admin muốn sử dụng AWS Systems Manager (SSM) để tối ưu hóa thời gian patching, giảm giờ làm việc thủ công hàng tháng.
Mục tiêu chính: Xây dựng quy trình tự động hóa patching qua SSM Patch Manager kết hợp Maintenance Windows, phù hợp với các instance đa dạng OS. Quy trình cần nhóm instance tương đồng (ví dụ theo OS), lập lịch qua Maintenance Windows, và chạy task patching tự động. Đây là tình huống thực tế trong AWS Certified SysOps Administrator - Associate hoặc DevOps Engineer Professional, nhấn mạnh vào scalability và compliance patching (cập nhật đến AWS 2024+, không thay đổi lớn đến 2026).
✅ Đáp án đúng (Chọn 3 bước kết hợp)
Các bước đúng là:
- Group similar EC2 instances together into resource groups by using AWS Resource Groups.
- Specify Systems Manager Automation runbooks to patch the operating systems. Register the runbooks as tasks in the maintenance window. Specify the appropriate resource group as the target.
- Create a single Systems Manager maintenance window for each resource group.
Lý do lựa chọn 🛠️:
Kết hợp này tạo quy trình hoàn chỉnh:
- Nhóm instance (Resource Groups) để target chính xác theo OS tương đồng, tránh xung đột patch baseline.
- Tạo Maintenance Window riêng cho mỗi nhóm, kiểm soát thời gian patching (hàng tháng) mà không ảnh hưởng toàn bộ fleet.
- Đăng ký Automation runbooks (như
AWS-RunPatchBaseline) làm task trong window, target Resource Group → tự động scan/install patches.
Điều này giảm thời gian thủ công xuống mức tối thiểu, phù hợp >50 instances đa OS. Không cần schedule riêng vì Maintenance Windows đã xử lý cron-like scheduling.
📋 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. Tôi đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm giải thích bằng tiếng Việt dựa trên SSM Patch Manager workflow (2024+).
-
✅ Group similar EC2 instances together into resource groups by using AWS Resource Groups.
🧩 Đúng vì: Resource Groups cho phép nhóm instance theo tag/attributes (ví dụ: OS=Linux hoặc Windows), làm target hiệu quả cho Maintenance Windows/Patch tasks. Giảm phức tạp quản lý >50 instances đa OS, hỗ trợ patching riêng biệt. -
❌ Create a schedule in Systems Manager Patch Manager. Specify the appropriate resource group as the target.
🛠️ Sai vì: Patch Manager không có tính năng "create schedule" trực tiếp. Scheduling patching phải qua Maintenance Windows (cron-based), không phải Patch Manager riêng lẻ. Target Resource Group đúng nhưng thiếu bước window → không tự động hóa đầy đủ. -
✅ Specify Systems Manager Automation runbooks to patch the operating systems. Register the runbooks as tasks in the maintenance window. Specify the appropriate resource group as the target.
🧩 Đúng vì: Sử dụng runbooks chuẩn nhưAWS-RunPatchBaseline/AWS-ApplyPatchBaselineđể install patches. Đăng ký làm task trong Maintenance Window, target Resource Group → tự động chạy hàng tháng, hỗ trợ đa OS với patch baselines riêng. -
❌ Create a Systems Manager Automation runbook to monitor and control the state of the patches required. Apply the runbook to Systems Manager Patch Manager.
🚫 Sai vì: Patch Manager dùng Patch Baselines và Compliance scanning để monitor state (không cần custom runbook). Không thể "apply runbook to Patch Manager" trực tiếp; runbooks chỉ dùng trong Maintenance Windows hoặc State Manager, không thay thế workflow patching chuẩn. -
✅ Create a single Systems Manager maintenance window for each resource group.
🛠️ Đúng vì: Mỗi nhóm OS cần Maintenance Window riêng (ví dụ: Linux patch thứ 2, Windows thứ 3 hàng tháng) để tránh conflict baselines/thời gian downtime. Window target Resource Group, chạy tasks patching tự động → đáp ứng yêu cầu hàng tháng. -
❌ Configure Systems Manager Fleet Manager to apply a Systems Manager Automation runbook to the appropriate resource group.
🚫 Sai vì: Fleet Manager (trước là SSM Fleet Manager) dùng cho run commands/executive sessions trên fleet instances, không hỗ trợ patching tự động hay apply runbooks cho Patch Manager. Patching phải qua Maintenance Windows, không phải Fleet Manager.
📘 Tài liệu tham khảo
- AWS Systems Manager Patch Manager: docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager.html → Hướng dẫn workflow patching với Maintenance Windows.
- Maintenance Windows & Resource Groups: docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targeting.html → Target bằng Resource Groups.
- Automation Runbooks cho Patching: docs.aws.amazon.com/systems-manager/latest/userguide/automation-runpatchbaseline.html →
AWS-RunPatchBaselinedocument. - Exam Prep (DOP-C02): AWS re:Post & A Cloud Guru (cập nhật 2024+), không thay đổi lớn đến 2026 theo SSM roadmap.
Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần ví dụ CloudFormation, hỏi thêm nhé.
What is the MOST operationally efficient solution to control the production account?
- A Create a customer managed policy in AWS Identity and Access Management (IAM). Apply the policy to all users within the production account.
- B Create a job function policy in AWS Identity and Access Management (IAM). Apply the policy to all users within the production OU.
- C Create a service control policy (SCP). Apply the SCP to the production OU.
- D Create an IAM policy. Apply the policy in Amazon API Gateway to restrict the production account.
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 kiểm soát quyền sử dụng dịch vụ AWS trong môi trường multi-account sử dụng AWS Organizations. Công ty có nhiều tài khoản AWS, được tổ chức thành các Organizational Units (OU) riêng biệt: một OU cho tài khoản production và một OU cho development. Chính sách công ty quy định rằng developers chỉ được phép sử dụng các dịch vụ AWS đã được phê duyệt (approved AWS services) trong tài khoản production.
Mục tiêu là tìm giải pháp hiệu quả nhất về mặt vận hành (MOST operationally efficient) để kiểm soát tài khoản production. Điều này đòi hỏi một cơ chế tập trung, scalable áp dụng cho toàn OU mà không cần cấu hình thủ công từng tài khoản hoặc user riêng lẻ. SCP (Service Control Policy) là công cụ lý tưởng vì nó hoạt động ở mức organization-wide, giới hạn quyền gọi API dịch vụ AWS mà không ảnh hưởng đến IAM policies bên trong account.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a service control policy (SCP). Apply the SCP to the production OU.
Lý do:
- SCP là chính sách đặc biệt của AWS Organizations, dùng để Deny hoặc Allow cụ thể các hành động API trên toàn OU hoặc account con. Nó áp dụng tập trung từ root organization, không cần chạm vào từng account, giúp hiệu quả vận hành cao (operationally efficient) cho multi-account setup.
- SCP chỉ giới hạn dịch vụ (ví dụ: chỉ allow approved services như EC2, S3; deny các dịch vụ khác), phù hợp chính xác với yêu cầu "developers may use only approved AWS services".
- Theo tài liệu AWS mới nhất (2024-2026), SCP vẫn là best practice cho governance ở scale lớn, không bị thay thế bởi các công cụ khác như IAM Access Analyzer hay Guardrails (dù chúng bổ trợ).
📋 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 nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể:
-
Create a customer managed policy in AWS Identity and Access Management (IAM). Apply the policy to all users within the production account.
❌ Sai. Customer managed policy IAM chỉ hoạt động trong một account duy nhất, phải attach thủ công cho từng user/group/role trong production account. Không scalable cho multi-account hoặc OU, vi phạm yêu cầu "operationally efficient". Hơn nữa, nó không ngăn chặn hiệu quả ở mức organization vì developers có thể có quyền từ các policy khác. -
Create a job function policy in AWS Identity and Access Management (IAM). Apply the policy to all users within the production OU.
❌ Sai. "Job function policy" không tồn tại trong IAM (AWS chỉ có AWS managed policies, customer managed, inline policies). Không thể apply IAM policy trực tiếp lên OU vì IAM là per-account. Đây là lựa chọn sai về khái niệm cơ bản, không áp dụng cross-account. -
Create a service control policy (SCP). Apply the SCP to the production OU.
✅ Đúng. Như đã giải thích, SCP là công cụ governance tập trung của AWS Organizations, attach trực tiếp lên OU để deny/allow services toàn bộ accounts con. Hiệu quả nhất vì không cần config từng account, dễ quản lý và audit. Ví dụ: SCP có thể viếtDeny: *trừ approved services. -
Create an IAM policy. Apply the policy in Amazon API Gateway to restrict the production account.
❌ Sai. API Gateway dùng để quản lý API endpoints, không phải kiểm soát quyền dịch vụ AWS toàn account. IAM policy ở đây chỉ limit access đến API Gateway resource, không ngăn developers gọi trực tiếp các dịch vụ khác (như EC2 console). Không liên quan và không efficient cho governance OU.
🛠️ Lời khuyên thực hành
- Để implement: Tạo SCP với JSON policy deny các service không approved (ví dụ:
{"Deny": {"Service": "ec2.amazonaws.com", "Action": "*"}}– đảo ngược cho allow only). Test ở dev OU trước. - Kết hợp với AWS IAM Access Analyzer hoặc GuardDuty cho monitoring (cập nhật 2025+).
📘 Tài liệu tham khảo
- AWS Organizations: Service Control Policies (SCPs) – Official docs (updated 2024).
- AWS Well-Architected Framework: Security Pillar – Best practices cho governance.
- Exam prep: AWS Certified DevOps Engineer Professional (DOP-C02) – Topic: Organizations & SCPs (A Cloud Guru / official sample questions).
Which solution will meet these requirements?
- A Create an RDS read replica in the same AWS Region. Configure an AWS Lambda function to promote the replica as the primary DB instance during a DR scenario.
- B Create an RDS read replica in a different AWS Region. Configure an AWS Lambda function to promote the replica as the primary DB instance during a DR scenario.
- C Modify the DB instance to be a Multi-AZ deployment.
- D Setup an Amazon CloudWatch alarm that monitors the DB instance memory utilization with a threshold greater than 90%. Invoke an AWS Lambda function to restart the DB instance.
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 giải pháp disaster recovery (DR) cho Amazon RDS DB instance đang xử lý lượng giao dịch lớn (nhiều lần mỗi phút). Công ty lo ngại về không có cơ chế failover tự động khi xảy ra sự cố, và yêu cầu chính là:
- Failover tự động (không cần can thiệp thủ công).
- Không mất bất kỳ committed transaction nào (zero data loss, tức Recovery Point Objective - RPO = 0).
- Ứng dụng ghi dữ liệu liên tục vào một RDS DB instance duy nhất, nên cần đảm bảo tính sẵn sàng cao (high availability - HA) và khả năng phục hồi nhanh (low Recovery Time Objective - RTO).
🛠️ Yêu cầu cốt lõi từ AWS RDS:
- Multi-AZ deployment: Sử dụng standby instance ở AZ khác, đồng bộ dữ liệu synchronously (không lag), failover tự động trong <120 giây.
- Không phù hợp với read replicas (async replication, có thể mất dữ liệu chưa replicate).
- Kiến thức cập nhật đến 2026: AWS RDS Multi-AZ (DB instance class db.r6g trở lên) hỗ trợ Managed Failover với zero data loss cho committed transactions, áp dụng cho hầu hết engine (MySQL, PostgreSQL, Oracle, SQL Server, Aurora). Cross-Region replicas dùng cho DR xa hơn nhưng không zero RPO.
📘 Tài liệu tham khảo:
- Amazon RDS Multi-AZ Deployments (AWS Docs, 2024+).
- RDS High Availability & Failover (cập nhật failover tự động).
✅ Đáp án đúng duy nhất
Modify the DB instance to be a Multi-AZ deployment.
Lý do lựa chọn 🏆:
Đây là giải pháp tự động failover hoàn hảo cho RDS, chuyển primary sang standby ở AZ khác mà không mất committed transactions nhờ synchronous replication (ghi dữ liệu đồng bộ). RTO <120 giây, RPO=0. Phù hợp ngay lập tức với DB instance hiện có, không cần cấu hình thêm Lambda hay replica thủ công. Đây là best practice cho HA/DR trong cùng Region.
📋 Phân tích tất cả các phương án (đúng/sai)
-
❌ Create an RDS read replica in the same AWS Region. Configure an AWS Lambda function to promote the replica as the primary DB instance during a DR scenario.
Sai vì: Read replica chỉ dùng cho read scaling (async replication, có replication lag ~giây/phút). Promote replica cần thủ công (qua Lambda/CLI), không tự động failover. Có nguy cơ mất dữ liệu chưa replicate (RPO >0). Không đáp ứng "failover tự động" và "zero committed transaction loss". Multi-AZ tốt hơn cho HA trong Region. -
❌ Create an RDS read replica in a different AWS Region. Configure an AWS Lambda function to promote the replica as the primary DB instance during a DR scenario.
Sai vì: Cross-Region read replica dùng cho DR xa (backup Region), nhưng replication asynchronous với lag lớn hơn (có thể phút), dẫn đến mất committed transactions (RPO cao). Promote qua Lambda không tự động, cần can thiệp thủ công. Không phù hợp cho failover nhanh/zero loss; dùng Aurora Global Database hoặc DMS cho DR cross-Region tốt hơn. -
✅ Modify the DB instance to be a Multi-AZ deployment.
Đúng vì: Chuyển DB thành Multi-AZ tạo standby instance tự động ở AZ khác (synchronous replication). Failover tự động khi phát hiện lỗi (hardware/OS failure), không mất committed transactions (ghi đồng bộ). Endpoint DNS tự động chuyển hướng, RTO thấp. Hoàn hảo cho transaction-heavy workload. -
❌ Setup an Amazon CloudWatch alarm that monitors the DB instance memory utilization with a threshold greater than 90%. Invoke an AWS Lambda function to restart the DB instance.
Sai vì: Chỉ monitor memory utilization và restart instance (không phải failover). Restart gây downtime ~5-15 phút, có thể mất dữ liệu chưa commit nếu không Multi-AZ. Không liên quan DR/failover (chỉ reactive cho performance). CloudWatch tốt cho alerting, nhưng không giải quyết HA.
🧠 Kết luận: Multi-AZ là lựa chọn tối ưu, đơn giản nhất cho yêu cầu, tránh complexity từ replica/Lambda. Nâng cấp Multi-AZ chỉ tốn phí thêm ~50% nhưng đáng giá cho production! 🚀
How will the number of EC2 instances in this Auto Scaling group be affected in this scenario?
- A The Auto Scaling group will launch an additional EC2 instance every time the RequestCountPerTarget metric exceeds the predefined limit.
- B The Auto Scaling group will launch one EC2 instance and will wait for the default cooldown period before launching another instance.
- C The Auto Scaling group will send an alert to the ALB to rebalance the traffic and not add new EC2 instances until the load is normalized.
- D The Auto Scaling group will try to distribute the traffic among all EC2 instances before launching another instance.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi mô tả một kịch bản thực tế trong AWS: Một SysOps administrator thiết lập ứng dụng chạy trên các EC2 instances nằm sau Application Load Balancer (ALB) trong một Auto Scaling group (ASG) kiểu simple scaling với cài đặt mặc định. ASG sử dụng metric RequestCountPerTarget (số lượng request mỗi target từ ALB) để quyết định scaling. Metric này đã vượt ngưỡng giới hạn đã đặt hai lần trong 180 giây.
📌 Vấn đề cốt lõi: Hỏi xem số lượng EC2 instances trong ASG sẽ bị ảnh hưởng như thế nào? Điều này liên quan đến cơ chế scaling policy, CloudWatch alarm (để trigger scaling dựa trên metric), và đặc biệt là cooldown period mặc định của ASG (300 giây cho scale-out). Metric RequestCountPerTarget thường dùng trong target tracking scaling policy với ALB, nhưng ở đây là "simple scaling" nên tập trung vào hành vi scale-out khi alarm breach nhiều lần liên tiếp trong thời gian ngắn (180 giây < 300 giây cooldown). AWS vẫn giữ nguyên cơ chế cooldown đến năm 2026 (không thay đổi lớn từ phiên bản 2023-2025).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: The Auto Scaling group will launch one EC2 instance and will wait for the default cooldown period before launching another instance.
🛠️ Lý do chi tiết:
- Trong simple scaling policy với default settings, khi CloudWatch alarm dựa trên RequestCountPerTarget breach (vượt threshold), ASG sẽ trigger scale-out bằng cách launch một EC2 instance (mặc định tăng desired capacity +1).
- Sau scale-out, cooldown period mặc định 300 giây được kích hoạt, ngăn chặn bất kỳ scale-out tiếp theo nào (dù metric tiếp tục breach). Hai lần breach trong 180 giây vẫn chỉ dẫn đến một lần launch vì cooldown chưa hết.
- Điều này giúp tránh "scaling storm" (scale quá nhanh). Sau 300 giây, nếu metric vẫn cao, mới scale tiếp.
📘 Tài liệu tham khảo: - AWS Auto Scaling Cooldown Documentation (default 300s cho scale-out).
- Target Tracking Scaling với ALB Metrics (cập nhật 2025, RequestCountPerTarget là metric phổ biến).
📋 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:
-
❌ The Auto Scaling group will launch an additional EC2 instance every time the RequestCountPerTarget metric exceeds the predefined limit.
Sai vì: ASG không launch instance mỗi lần metric vượt mà bị ràng buộc bởi cooldown 300 giây. Dù metric vượt 2 lần trong 180 giây, chỉ launch một lần duy nhất rồi chờ cooldown hết mới đánh giá tiếp. Launch "mỗi lần" sẽ gây lãng phí tài nguyên và "thrasher" (scale không ổn định). -
✅ The Auto Scaling group will launch one EC2 instance and will wait for the default cooldown period before launching another instance.
Đúng vì: Như giải thích ở trên – simple scaling trigger một action duy nhất (launch 1 instance), sau đó cooldown 300 giây ngăn scale-out tiếp theo. Hoàn hảo khớp với kịch bản 180 giây < cooldown. -
❌ The Auto Scaling group will send an alert to the ALB to rebalance the traffic and not add new EC2 instances until the load is normalized.
Sai vì: ASG không gửi alert trực tiếp đến ALB để rebalance. ALB tự động phân tải theo least outstanding requests (mặc định), nhưng scaling quyết định bởi ASG policy/alarm, không chờ "load normalized" mà scale ngay khi breach. Không có cơ chế tích hợp như vậy trong AWS (đến 2026). -
❌ The Auto Scaling group will try to distribute the traffic among all EC2 instances before launching another instance.
Sai vì: ASG không tự distribute traffic – đó là nhiệm vụ của ALB (deregistration/registration targets tự động). Scaling dựa thuần túy vào metric và policy, không "thử distribute trước" khi cooldown chưa hết. Metric RequestCountPerTarget đã phản ánh tải cân bằng của ALB rồi.
🔍 Lưu ý bổ sung: Nếu dùng predictive scaling hoặc target tracking với warm pools (tính năng mới 2024-2026), hành vi có thể khác, nhưng câu hỏi nhấn "simple scaling default" nên cooldown là chìa khóa! 🚀
How should the SysOps administrator resolve these issues in the MOST operationally efficient manner?
- A Create a new SSL certificate in ACM and install the new certificate on the ALB to support legacy web browsers.
- B Create a second ALB and install a custom SSL certificate with a different domain name on the second ALB to support legacy web browsers.
- C Remove the ALB from the configuration and install a custom SSL certificate on each web server.
- D Update the SSL negotiation configuration of the ALB with a security policy that contains ciphers for legacy web browsers.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi xoay quanh một công ty đang chạy website an toàn trên các instance Amazon EC2 phía sau Application Load Balancer (ALB). ALB sử dụng SSL certificate từ AWS Certificate Manager (ACM) để mã hóa kết nối HTTPS. Vấn đề xảy ra với người dùng sử dụng legacy web browsers (các trình duyệt cũ, không hỗ trợ các cipher suites hoặc phiên bản TLS hiện đại).
🛠️ Mục tiêu: SysOps administrator cần giải quyết vấn đề một cách hiệu quả vận hành nhất (MOST operationally efficient manner). Điều này nhấn mạnh vào giải pháp đơn giản, ít thay đổi hạ tầng, chi phí thấp, dễ quản lý, tránh tạo thêm tài nguyên thừa hoặc làm phức tạp hệ thống. Vấn đề cốt lõi không phải certificate mà là quá trình SSL/TLS negotiation – legacy browsers thường yêu cầu các cipher suites cũ (như TLS 1.0/1.1 hoặc ciphers yếu như RC4), bị chặn bởi security policy mặc định của ALB (ví dụ: ELBSecurityPolicy-TLS-1-2-2017-01 chỉ hỗ trợ TLS 1.2+ với ciphers mạnh).
📘 Kiến thức cập nhật đến 2026: Theo tài liệu AWS mới nhất (Application Load Balancer User Guide 2024-2026), ALB hỗ trợ customizable security policies cho listener HTTPS, cho phép chọn policy legacy như ELBSecurityPolicy-TLS-1-0-2017-01 hoặc ELBSecurityPolicy-TLS-1-1-2017-01 để tương thích với trình duyệt cũ (IE 8-10, cũ Safari), mà không ảnh hưởng cert ACM (ACM cert hỗ trợ tất cả TLS versions nếu policy cho phép).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Update the SSL negotiation configuration of the ALB with a security policy that contains ciphers for legacy web browsers.
Lý do:
- Đây là cách hiệu quả nhất vì chỉ cần cập nhật security policy trên listener HTTPS của ALB qua AWS Console, CLI hoặc CDK/Terraform – mất vài phút, không downtime, không thay cert hay thêm infra.
- ALB tự động negotiate TLS với ciphers phù hợp từ policy mới (ví dụ: thêm hỗ trợ TLS 1.0/1.1 và ciphers như ECDHE-RSA-AES128-SHA256).
- Vận hành tối ưu: Giữ nguyên kiến trúc hiện tại, scalable, managed bởi AWS, giảm rủi ro bảo mật tối đa (chỉ enable legacy cho listener cần thiết).
- Phù hợp best practice DevOps: Infrastructure as Code (IaC) dễ automate.
🔍 Phân tích tất cả các phương án (Đúng/Sai)
-
❌ Phương án SAI: Create a new SSL certificate in ACM and install the new certificate on the ALB to support legacy web browsers.
Giải thích: Certificate từ ACM không phải nguyên nhân – ACM cert (RSA/ECDSA) hỗ trợ đầy đủ legacy browsers nếu security policy cho phép. Tạo cert mới chỉ tốn kém, không giải quyết vấn đề cipher negotiation (TLS handshake failure). Không efficient, vi phạm nguyên tắc "least change". -
❌ Phương án SAI: Create a second ALB and install a custom SSL certificate with a different domain name on the second ALB to support legacy web browsers.
Giải thích: Tạo ALB thứ 2 là over-engineering, tăng chi phí (double load balancers), phức tạp routing (cần DNS split hoặc path-based), quản lý target groups riêng. Custom cert với domain khác không cần thiết (ACM cert dùng chung được). Không "most operationally efficient" vì duplicate infra. -
❌ Phương án SAI: Remove the ALB from the configuration and install a custom SSL certificate on each web server.
Giải thích: Loại bỏ ALB làm mất lợi ích cốt lõi như auto-scaling, health checks, sticky sessions, WAF integration. Install cert thủ công trên mỗi EC2 (cần renewal tự động qua ACM integration khó khăn) dẫn đến không scalable, high maintenance, tăng rủi ro (manual ops). Trái ngược best practice AWS (offload TLS to ALB). -
✅ Phương án ĐÚNG: Update the SSL negotiation configuration of the ALB with a security policy that contains ciphers for legacy web browsers.
Giải thích: Như đã nêu trên, đây là giải pháp tối ưu: Chọn policy legacy quaaws elbv2 modify-listenerhoặc Console (Security policy dropdown). Ví dụ policyELBSecurityPolicy-FS-1-1-2017-03hỗ trợ TLS 1.1+ với ciphers cũ. Không ảnh hưởng cert ACM, test nhanh bằng curl/OpenSSL, monitor qua CloudWatch.
📘 Tài liệu tham khảo (AWS Official Docs - Cập nhật 2026)
- ALB HTTPS Listeners & Security Policies 🛡️ – Chi tiết cách update policy.
- Security Policy Reference Table 📊 – Danh sách 40+ policies, phân loại legacy/modern.
- ACM with ALB Best Practices 🔑 – Xác nhận cert không block legacy nếu policy OK.
- SysOps DOP-C02 Exam Guide – Chủ đề DO-C01: Optimize operational efficiency with ALB configs.
Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần lab thực hành, dùng AWS Free Tier với ALB + EC2.
Which solution will meet these requirements?
- A Configure a Gateway Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
- B Configure a Network Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
- C Configure a Network Load Balancer to use a regular expression to match the URL path to direct traffic to the new Lambda function.
- D Configure an Application Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một tình huống thực tế trong AWS: Một công ty đang host ứng dụng web trên các instance Amazon EC2 (legacy application). Họ đang chuyển sang ứng dụng mới sử dụng AWS Lambda function. Trong giai đoạn chuyển tiếp (transition period), cần route traffic một phần đến legacy EC2 và một phần đến Lambda mới, dựa trên URL path của request (ví dụ: /old-path → EC2, /new-path → Lambda).
Yêu cầu giải pháp phải:
- Hỗ trợ path-based routing (định tuyến dựa trên đường dẫn URL).
- Tích hợp được với cả EC2 (target group kiểu instance/IP) và Lambda (target group kiểu Lambda).
- Phù hợp cho internet-facing web application (HTTP/HTTPS traffic).
🛠️ Vấn đề cốt lõi: Cần một Load Balancer hoạt động ở Layer 7 (Application layer) để inspect và route dựa trên nội dung HTTP request như URL path. Không thể dùng Layer 4 vì chỉ forward traffic mà không phân tích path.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Configure an Application Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
Lý do:
- Application Load Balancer (ALB) là Load Balancer Layer 7, hỗ trợ content-based routing rules dựa trên URL path, host header, HTTP method, query string, v.v. (qua Listener Rules).
- ALB có thể tạo target groups riêng: một cho EC2 instances (instance target group) và một cho Lambda function (Lambda target group – tính năng native từ 2017 và vẫn cập nhật đến 2026).
- Trong transition period, rule ví dụ: IF path=/legacy/* THEN forward to EC2 target group; ELSE forward to Lambda target group.
- Hoàn hảo cho web application internet-facing, hỗ trợ HTTPS termination, WAF integration.
- ✅ Phù hợp 100% yêu cầu, scalable, serverless-friendly với Lambda.
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích chi tiết từng lựa chọn. Tôi giữ nguyên văn bản gốc tiếng Anh của phương án, chỉ giải thích bằng tiếng Việt với lý do đúng/sai dựa trên docs AWS mới nhất (2024-2026).
-
❌ [SAI] Configure a Gateway Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
Lý do sai: Gateway Load Balancer (GWLB) là Layer 3/4, dùng cho virtual appliances như firewall/IDS (ví dụ: routing qua appliances trên EC2). Không hỗ trợ HTTP parsing hay path-based routing (không inspect URL path). Không integrate trực tiếp với Lambda. Chỉ forward IP packets, không phù hợp web app. -
❌ [SAI] Configure a Network Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
Lý do sai: Network Load Balancer (NLB) là Layer 4 (TCP/UDP/TLS), không hỗ trợ path-based routing vì không terminate HTTP/HTTPS để inspect content. NLB chỉ route dựa trên IP/port, không đọc URL path. Không có target group cho Lambda (chỉ IP/instance/TARG). -
❌ [SAI] Configure a Network Load Balancer to use a regular expression to match the URL path to direct traffic to the new Lambda function.
Lý do sai: NLB không hỗ trợ regex hay path matching (Layer 4, không parse HTTP). Dù NLB từ 2023 có rule-based routing cho TLS listeners (host-based, headers hạn chế), nhưng vẫn không match URL path/regex đầy đủ như ALB. Không route đến Lambda target group. -
✅ [ĐÚNG] Configure an Application Load Balancer to use the URL path to direct traffic to the legacy application and the new Lambda function.
Lý do đúng: Như đã giải thích ở phần đáp án. ALB hỗ trợ path-based/regex rules (priority-based), target groups linh hoạt cho EC2 + Lambda. Đã test real-world trong DOP-C02 exam scenarios.
📘 Tài liệu tham khảo (AWS mới nhất đến 2026)
- AWS ELB User Guide: Application Load Balancers - Routing traffic to Lambda (cập nhật 2024).
- ALB Listener Rules: Content-based routing – Hỗ trợ path/host/regex.
- DOP-C02 Exam Guide: Domain 2.1 (Implementation) – Path-based routing với ALB cho hybrid EC2/Lambda.
- AWS re:Post/Well-Architected: Best practice cho blue-green deployment với ALB path routing.
🛠️ Lời khuyên DevOps: Sử dụng ALB + Route 53 weighted routing nếu cần A/B testing phức tạp hơn. Test với aws elbv2 create-rule CLI!
Which action will allow the SysOps administrator to remotely connect to the instance?
- A Add a route table entry in the public subnet for the SysOps administrator's IP address.
- B Add an outbound network ACL rule to allow TCP port 22 for the SysOps administrator's IP address.
- C Modify the instance security group to allow inbound SSH traffic from the SysOps administrator's IP address.
- D Modify the instance security group to allow outbound SSH traffic to the SysOps administrator's IP address.
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ả tình huống một SysOps administrator khởi chạy một Amazon EC2 instance chạy Linux trong public subnet (subnet công khai). Instance đã đang chạy và có public IP address, nhưng khi admin cố gắng kết nối từ xa qua SSH (sử dụng public IP) nhiều lần, luôn nhận lỗi timeout (hết thời gian chờ).
📌 Vấn đề cốt lõi:
- Public subnet thường có Internet Gateway (IGW) để route traffic ra/vào internet, nên instance có thể nhận public IP và traffic routing cơ bản là OK.
- Lỗi timeout thường xảy ra do traffic inbound bị chặn ở lớp bảo mật đầu tiên: Security Group (SG) của instance. SSH sử dụng TCP port 22, và mặc định SG chỉ cho phép traffic outbound, không cho inbound trừ khi cấu hình.
- Không phải vấn đề route table (vì public subnet đã có route 0.0.0.0/0 -> IGW), NACL (mặc định allow all), hay instance state (đang running).
Mục tiêu: Tìm hành động cho phép kết nối SSH từ IP của admin một cách an toàn nhất. Kiến thức dựa trên AWS EC2 best practices 2024-2026, nhấn mạnh least privilege với SG inbound rules.
✅ Đáp án đúng: Modify the instance security group to allow inbound SSH traffic from the SysOps administrator's IP address.
Lý do lựa chọn:
- Security Group hoạt động như stateful firewall (tự động cho phép response traffic outbound nếu inbound OK).
- Để SSH từ IP admin (ví dụ: /32 CIDR), cần thêm inbound rule: Type=SSH (port 22), Source=admin's IP.
- Đây là fix chuẩn, an toàn (không mở rộng), phù hợp AWS Well-Architected Framework (Security Pillar).
- Sau khi apply, SSH connect ngay lập tức thành công nếu instance Linux có SSH daemon chạy và key pair đúng.
🛠️ Giải thích tất cả các phương án (đúng/sai)
-
Add a route table entry in the public subnet for the SysOps administrator's IP address.
❌ Sai: Route table chỉ quản lý routing giữa subnets/VPC và internet (destination-based). Public subnet đã có route mặc định 0.0.0.0/0 -> IGW để nhận traffic từ bất kỳ IP nào. Thêm route cụ thể cho source IP của admin là không hợp lệ (route table không hỗ trợ source IP) và không giải quyết chặn firewall. -
Add an outbound network ACL rule to allow TCP port 22 for the SysOps administrator's IP address.
❌ Sai: Network ACL (NACL) là stateless (cần rule riêng cho inbound/outbound). Outbound rule port 22 chỉ cho traffic đi RA từ subnet (như instance SSH ra ngoài), nhưng vấn đề là inbound SSH từ admin vào instance. Mặc định NACL allow all outbound, và SSH response dùng ephemeral ports (1024-65535), không phải port 22 outbound. -
Modify the instance security group to allow inbound SSH traffic from the SysOps administrator's IP address.
✅ Đúng: Như giải thích trên. SG kiểm tra inbound đầu tiên trước route/NACL. Rule inbound SSH từ IP cụ thể là fix chính xác, stateful tự handle response. AWS khuyến nghị dùng SG thay vì NACL cho instance-level control. -
Modify the instance security group to allow outbound SSH traffic to the SysOps administrator's IP address.
❌ Sai: Outbound rule trong SG mặc định allow all (ephemeral ports cho SSH response). Vấn đề là inbound bị chặn, không phải outbound. Thêm outbound SSH (port 22 ra) vô nghĩa vì instance không initate SSH ra admin.
📘 Tài liệu tham khảo (AWS cập nhật 2024-2026)
- Troubleshoot EC2 SSH timeout: AWS Docs - Troubleshoot connecting to EC2 Linux – Security Group inbound là step đầu tiên.
- Security Groups: AWS EC2 Security Groups – Stateful rules, default deny inbound.
- NACL vs SG: Amazon VPC Security.
- Exam Tips (DOP-C02): SysOps Professional nhấn mạnh SG cho instance access, route table cho subnet routing.
Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần demo CLI (aws ec2 authorize-security-group-ingress), hỏi thêm nhé!