Systems Manager for fleet operations
Operating many servers without SSH: managed nodes, Session Manager, Run Command, Patch Manager, State Manager and Automation runbooks.
Launching and connecting to instancesInstance metadata and user dataWorkload identity for EC2, Lambda and CICloudTrail and AWS Config
Systems Manager for fleet operations
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- A managed node is a machine running SSM Agent that can reach Systems Manager and has permission to use it. It can be on EC2 or elsewhere.
- Session Manager gives a shell through IAM with no inbound port, bastion or SSH key.
- Session logging is something you configure, and it does not capture SSH or port-forwarding sessions.
- Run Command sends a document to many nodes. Set concurrency and error limits so one bad command cannot take out the fleet.
- Patch Manager applies baselines on a schedule and reports compliance, and State Manager keeps a setting applied.
- The right to start a session or send a command is effectively root on the node. Grant it that carefully.
Forty servers and one urgent fix
A vulnerability lands. You have forty instances in private subnets. The old way is a bastion host, a pile of SSH keys and a loop in a shell script, with an open port, keys that outlive the people who held them, and little record of who did what.
AWS Systems Manager turns this around. An agent on each machine calls home, and you give instructions to the service. Think of a dispatcher with radio contact to every van, instead of a manager driving out to each one.
Managed nodes
A machine becomes a managed node when three things are true:
- SSM Agent is installed and running. Many AWS-provided AMIs include it.
- It has permission: an instance profile, or Default Host Management Configuration, which you enable per account and Region and which needs IMDSv2.
- It can reach the service over HTTPS, through the internet or VPC endpoints.
On-premises and other-cloud machines can be registered too. When a node is missing, it is nearly always one of the three.
Session Manager
aws ssm start-session --target i-0123456789abcdef0
You get a shell (the CLI needs the Session Manager plugin). No inbound port, bastion or key pair. IAM decides who may start a session on which nodes, for example by tag, and CloudTrail records the start.
Two things to set deliberately. Session logging of the shell’s contents to S3 or CloudWatch Logs is configuration you turn on, and it does not cover SSH or port-forwarding sessions tunnelled through. And on Linux the default session user, ssm-user, is added to sudoers. Remove that or set your own policy if a session shouldn’t mean root.
Port forwarding is handy in its own right: reach a private database from your laptop through a node, with no public exposure.
Run Command
Run Command executes a document (a parameterised script, such as AWS-RunShellScript) on nodes chosen by ID or tag:
aws ssm send-command --document-name AWS-RunShellScript \
--targets Key=tag:role,Values=web \
--parameters 'commands=["systemctl restart app"]' \
--max-concurrency 10% --max-errors 2
The last line is the important one. Without limits, a broken command reaches everything quickly. With them it goes out gradually and stops after failures. Output can be sent to S3 or CloudWatch Logs.
Keeping the fleet in line
- Patch Manager scans and installs updates according to a patch baseline, which says what is approved and after how many days. A predefined baseline exists per operating system. Patch policies in Quick Setup, the recommended route, apply one configuration across accounts and Regions. Patch a test group first and plan reboots.
- State Manager reapplies a desired setting on a schedule, such as “this agent is installed and running”.
- Maintenance windows limit disruptive work to agreed hours.
- Inventory records what is installed, which answers “where is that library?” quickly.
- Automation runs multi-step runbooks, with approvals, across instances and other AWS resources. Config rules can call one to remediate.
Parameter Store also lives under the Systems Manager name. Some older tools there, such as Application Manager, are closed to new customers.
Patch, or replace?
For stateless fleets, it is often cleaner to build a new image and roll it through an Auto Scaling group than to change running servers. Keep in-place patching for long-lived hosts, and use Session Manager for investigation, not routine hand edits. A hand fix that isn’t in code disappears with the next replacement.
Remember who holds the controls. ssm:SendCommand and ssm:StartSession on a node are as powerful as the node’s root user and its IAM role combined.
About the video
The embed is a clip (4:02 to 43:54) of AWS re:Invent 2024’s “Scaling IT with the next generation of AWS Systems Manager”. Its chapters in that range cover the service’s origin, core functions, Session Manager, the unified console experience, node management and automation and compliance, with demos. It leans toward the then-new console. I judged it from chapters and description only, since transcripts couldn’t be fetched. English was judged from its English caption track and title. A patching components video is in deeper.
What was run: nothing. These features need real nodes running the agent. Commands and behaviour are from the AWS docs, checked 2026-11-29.
Where this fits
Patching protects the servers you have. Next, what happens when you lose them, or the data on them: backup and disaster recovery.
Check yourself
A new instance in a private subnet does not show up as a managed node. What three things do you check?
That SSM Agent is installed and running, that the instance has permission (an instance profile or Default Host Management Configuration), and that it can reach the Systems Manager endpoints over HTTPS, through NAT or VPC endpoints.
No inbound ports are open. How can Session Manager connect?
The agent on the node makes the outbound connection to the service. Your session is relayed over that, so nothing needs to listen for incoming connections.
You are about to run a package upgrade on 400 nodes. What two settings limit the damage if it is broken?
max-concurrency, so only a few nodes run it at once, and max-errors, so the command stops being sent after a set number or share of failures.
Auditors want every command typed on production hosts. Engineers also tunnel SSH through Session Manager. Is that a problem?
Yes. Session content is not logged for SSH or port-forwarding sessions, because the service only carries an encrypted tunnel. Disallow those session types where full logging is required.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.