Skip to main content

AWS Systems Manager (SSM)

คืออะไร

AWS Systems Manager จัดการ EC2 instances และ on-premises servers แบบรวมศูนย์

ข้อกำหนด

  • ต้องติดตั้ง SSM Agent (pre-installed บน Amazon Linux 2)
  • Instance ต้องมี IAM Role: AmazonSSMManagedInstanceCore

บริการย่อยที่สำคัญ

Run Command

  • รันคำสั่ง/scripts บน หลาย instances พร้อมกัน
  • ไม่ต้องใช้ SSH
  • ผลลัพธ์ส่งไป: Console, S3, CloudWatch
  • เรียกผ่าน EventBridge ได้

Session Manager

  • เข้าถึง shell โดยไม่ต้องเปิด SSH (port 22)
  • ไม่ต้องใช้ Bastion Host
  • Logs ส่งไป S3/CloudWatch
  • CloudTrail ดักจับ StartSession events

Patch Manager

  • Automated patching ด้วย Patch Baselines (pre-defined/custom)
  • Patch Groups — จัดกลุ่มด้วย tags (1 group ต่อ instance)
  • ทำงานร่วมกับ Maintenance Windows

Maintenance Windows

  • กำหนด ช่วงเวลา สำหรับ run tasks
  • กำหนด duration, registered instances, tasks

Parameter Store

  • เก็บ configuration และ secrets แบบ secure
  • รองรับ KMS encryption
  • Standard: 10,000 params, 4KB/param
  • Advanced: 100,000 params, 8KB/param, TTL policies
  • จัดลำดับแบบ hierarchy (/app/dev/db-password)

Automation

  • ทำ maintenance tasks อัตโนมัติ (restart instances, สร้าง AMI)
  • ใช้ Runbooks (SSM Documents)
  • Trigger จาก: EventBridge, Maintenance Windows, AWS Config remediation

Inventory

  • เก็บ metadata ของ instances (installed software, OS, services)
  • Query ด้วย Athena/QuickSight

Fleet Manager

  • จัดการ nodes แบบรวมศูนย์ (EC2, on-premises, edge/IoT)
  • รองรับ RDP และ Session Manager