1. What is Systems Manager?
AWS Systems Manager is a management service that helps you manage your EC2 instances, on-premises servers, and other AWS resources at scale. It provides operational tools for patching, running commands, managing configuration, and maintaining compliance.
Core Concept
Systems Manager = manage servers at scale without SSH. Run commands, patch OS, collect inventory, manage configuration, automate operational tasks — all from a central console. Works on EC2 AND on-premises servers. Requires the SSM Agent (pre-installed on Amazon Linux 2, Ubuntu, Windows AMIs).
2. SSM Agent & Prerequisites
- SSM Agent: software installed on managed instances that communicates with SSM service
- Pre-installed on: Amazon Linux 2/2023, Ubuntu 16.04+, Windows Server 2016+
- Must install manually on: older AMIs, custom AMIs, on-premises servers
- IAM Role: EC2 instance must have IAM role with AmazonSSMManagedInstanceCore policy
- No SSH/RDP needed: SSM communicates over HTTPS (port 443) to the SSM service endpoint
- On-premises: requires Hybrid Activation (registration with SSM) + SSM Agent
3. Key SSM Capabilities
Session Manager
- Secure shell access to EC2/on-premises without opening SSH port 22 or RDP port 3389
- No bastion hosts needed. No SSH keys to manage.
- All sessions are logged to S3 and/or CloudWatch Logs (full audit trail)
- IAM-based access control: who can start sessions on which instances
- Port forwarding: tunnel to private resources through Session Manager
- Works through the AWS Console, CLI, or SDK
Session Manager vs Bastion Host
Session Manager eliminates the need for bastion hosts. No inbound SSH/RDP ports open, no SSH key management, full audit logging, IAM-controlled access. The exam often presents a scenario where SSH access is needed to private instances — the answer is Session Manager (not bastion host) for security best practices.
Run Command
- Execute commands or scripts on managed instances remotely (no SSH)
- Run on: individual instances, groups by tag, all instances, Resource Groups
- Pre-built commands (SSM Documents): AWS-RunShellScript, AWS-RunPowerShellScript, AWS-UpdateSSMAgent
- Rate control: limit how many instances execute simultaneously (concurrency + error threshold)
- Output to: S3, CloudWatch Logs, or Console
- Notifications via SNS on command completion/failure
- No SSH keys needed. IAM-based authorization.
Patch Manager
- Automate OS and application patching across your fleet
- Patch Baselines: define which patches to approve (by classification, severity, auto-approval delay)
- AWS provides default baselines for each OS. Create custom baselines for more control.
- Maintenance Windows: schedule when patching occurs (e.g., Sunday 2–4 AM)
- Patch Groups: tag-based grouping (e.g., PatchGroup=Production, PatchGroup=Dev)
- Compliance reporting: see which instances are compliant/non-compliant
- Supports: Linux, Windows, macOS
Parameter Store
- Centralized storage for configuration data and secrets (covered in Security module)
- Hierarchical: /app/dev/db/password
- Types: String, StringList, SecureString (KMS encrypted)
- Free Standard tier (10K params, 4 KB) + paid Advanced tier
- Used by: EC2, Lambda, ECS, CloudFormation, CodeDeploy
State Manager
- Define and maintain a desired configuration state for your instances
- Associations: apply an SSM Document to instances on a schedule
- Example: ensure CloudWatch Agent is always installed and running on all EC2 instances
- Auto-remediation: if an instance drifts from desired state, State Manager re-applies
Inventory
- Collect metadata from managed instances: installed apps, OS version, network config, Windows updates, running services
- Automatic and scheduled collection
- View in SSM Console or query with S3 + Athena for fleet-wide analysis
- Use for: software license compliance, audit, fleet visibility
Automation
- Define and execute multi-step operational workflows (runbooks)
- SSM Automation Documents (runbooks): sequence of steps (API calls, scripts, approvals)
- Pre-built runbooks: AWS-RestartEC2Instance, AWS-StopEC2Instance, AWS-CreateSnapshot, AWS-EnableS3BucketEncryption
- Integration: Config Remediation, EventBridge, CloudWatch Alarms use SSM Automation
- Can include manual approval steps (human-in-the-loop)
- Use for: auto-remediate Config findings, incident response, scheduled maintenance
OpsCenter
- Centralized location to view, investigate, and resolve operational issues (OpsItems)
- Aggregates issues from: CloudWatch Alarms, Config non-compliance, EventBridge events, manual creation
- Links related resources, runbooks, and timeline for each issue
- Integrated with SSM Automation for one-click remediation
4. SSM Capabilities Summary
Exam Tip
SSM: "Access EC2 without SSH/bastion" = Session Manager. "Run command on fleet" = Run Command. "Automate patching" = Patch Manager. "Auto-remediate Config" = SSM Automation. "Store config" = Parameter Store. SSM Agent required. IAM role: AmazonSSMManagedInstanceCore. Works on EC2 + on-premises. No port 22 needed.