AWS Systems Manager
Quản lý máy & cấu hình
Bộ công cụ vận hành: vá lỗi, chạy lệnh từ xa, đăng nhập không cần SSH (Session Manager), lưu cấu hình (Parameter Store).
- Chi phí$ Rẻ
- Độ khó●●●●●
- Để không có tốn tiền?Không
- AWS quản lý
- Có trong đềSAA · DVA · SOA
Hình dungNhư phòng IT điều khiển từ xa mọi máy trong công ty.
Systems Manager đứng ở đâu trong hệ thống?
Gọi tới Systems Manager
Systems Manager gọi tới
Một ví dụ thật, từng bước
- Bạn có 200 máy EC2 trong subnet private và một lỗ hổng nghiêm trọng vừa được công bố.
- Mọi máy đã có SSM agent và IAM role phù hợp nên hiện lên trong Systems Manager như máy được quản lý.
- Bạn dùng Run Command chạy lệnh cập nhật trên cả 200 máy cùng lúc và xem kết quả từng máy.
- Cần vào một máy để kiểm tra, bạn mở Session Manager ngay trên trình duyệt: không mở cổng 22, không cần bastion hay khoá SSH.
- Patch Manager được đặt lịch vá hằng tuần, còn cấu hình ứng dụng lưu trong Parameter Store.
Khi nào nên dùng
✓ Nên dùng khi
Quản lý nhiều EC2/máy on-prem, lưu cấu hình ứng dụng.
Ví dụ hay gặp
- Đăng nhập EC2 không cần SSH hay bastion (Session Manager)
- Vá lỗi hàng loạt (Patch Manager)
- Lưu cấu hình ứng dụng (Parameter Store)
- Chạy lệnh trên nhiều máy (Run Command)
Systems Manager, Secrets Manager hay CloudFormation?
| Làm gì | Vận hành máy và lưu cấu hình | Lưu và xoay bí mật | Dựng hạ tầng từ template |
|---|---|---|---|
| Truy cập máy | Session Manager, không cần SSH | Không | Không |
| Lưu cấu hình | Parameter Store (bản tiêu chuẩn miễn phí) | Có, tính phí theo bí mật | Tham số của stack |
| Tự động | Run Command, Automation, Patch Manager | Xoay mật khẩu | Tạo, sửa, xoá tài nguyên |
Tốn bao nhiêu tiền?
- Cách tính: Phần lớn tính năng miễn phí. Tính phí: tham số advanced (~$0,05/tham số/tháng), throughput cao của Parameter Store, OpsCenter, một số tính năng cho máy on-prem.
- Miễn phí: Session Manager, Run Command, Parameter Store bản standard: miễn phí.
Bật nhầm tham số advanced; log phiên Session Manager đổ vào CloudWatch Logs.
Vào máy trong subnet private mà không mở SSH, không bastion → Session Manager. Chạy lệnh/vá khẩn trên hàng loạt máy → Run Command; vá định kỳ → Patch Manager + maintenance window. Máy không hiện trong Systems Manager → kiểm tra agent, IAM role, đường ra endpoint.
Thử sức với câu hỏi thi thật
1A company has a production workload that runs on 1,000 Amazon EC2 Linux instances. The workload is powered by third-party software. The company needs to patch the third-party software on all EC2 instances as quickly as possible to remediate a critical security vulnerability. What should a solutions architect do to meet these requirements?
- ACreate an AWS Lambda function to apply the patch to all EC2 instances.
- BConfigure AWS Systems Manager Patch Manager to apply the patch to all EC2 instances.
- CSchedule an AWS Systems Manager maintenance window to apply the patch to all EC2 instances.
- DUse AWS Systems Manager Run Command to run a custom command that applies the patch to all EC2 instances.
Xem đáp án
Đáp án đúng: D
Systems Manager Run Command chạy ngay một lệnh tuỳ chỉnh trên cả 1.000 máy cùng lúc. Patch Manager và maintenance window hợp với vá theo lịch, không phải vá khẩn cấp phần mềm của bên thứ ba.
2A company recently launched a variety of new workloads on Amazon EC2 instances in its AWS account. The company needs to create a strategy to access and administer the instances remotely and securely. The company needs to implement a repeatable process that works with native AWS services and follows the AWS Well-Architected Framework. Which solution will meet these requirements with the LEAST operational overhead?
- AUse the EC2 serial console to directly access the terminal interface of each instance for administration.
- BAttach the appropriate IAM role to each existing instance and new instance. Use AWS Systems Manager Session Manager to establish a remote SSH session.
- CCreate an administrative SSH key pair. Load the public key into each EC2 instance. Deploy a bastion host in a public subnet to provide a tunnel for administration of each instance.
- DEstablish an AWS Site-to-Site VPN connection. Instruct administrators to use their local on-premises machines to connect directly to the instances by using SSH keys across the VPN tunnel.
Xem đáp án
Đáp án đúng: B
Gắn IAM role cho instance và dùng Session Manager: không mở cổng SSH, không cần bastion hay quản lý khoá, mọi phiên được kiểm soát bằng IAM. Bastion và VPN tốn công vận hành hơn nhiều.
Câu hỏi thường gặp
Session Manager khác gì SSH qua bastion host?
Session Manager mở phiên dòng lệnh vào máy qua agent, không cần mở cổng 22, không cần bastion hay khoá SSH, phân quyền bằng IAM và có thể ghi lại toàn bộ phiên. Bastion phải mở cổng và tự quản lý khoá.
Systems Manager gồm những gì?
Nhiều công cụ vận hành: Session Manager (truy cập máy), Run Command (chạy lệnh hàng loạt), Patch Manager (vá lỗi), Parameter Store (lưu cấu hình và bí mật), Automation (chạy runbook), Inventory, State Manager và một số tính năng khác.
Systems Manager có tính phí không?
Phần lớn tính năng cơ bản miễn phí, như Session Manager, Run Command, Patch Manager và Parameter Store bản tiêu chuẩn. Tính phí cho Parameter Store bản advanced, quản lý máy on-prem ở mức advanced, và một số tính năng như Automation vượt hạn mức.
Đề thi AWS hay hỏi gì về Systems Manager?
Truy cập máy trong subnet private không cần SSH, vá lỗi hàng loạt theo lịch, Parameter Store so với Secrets Manager, và điều kiện để máy được quản lý: có SSM agent, IAM role phù hợp và kết nối tới endpoint của Systems Manager.