Systems Manager and event-driven automation: managing resources for SOA-C03
Automating the management of existing resources means running day-two operations — patching, configuration enforcement, ad hoc commands, and remediation — through AWS Systems Manager and event-driven services instead of SSH sessions and hand-run scripts. It is one of two tasks in Domain 3 (Deployment, Provisioning, and Automation) of SOA-C03, and its scenarios turn on precise distinctions: shell access without inbound ports means Session Manager, continuously enforced configuration means State Manager, patch compliance means Patch Manager, an instance missing from Systems Manager means the agent, its credentials, or the network path, and 'when X happens, do Y' means an EventBridge rule. This lesson covers managed-node prerequisites (including Default Host Management Configuration and VPC endpoints), Session Manager and Run Command, Automation runbooks, Patch Manager and maintenance windows, State Manager, Inventory and Parameter Store, and event-driven automation with EventBridge, S3 Event Notifications, Lambda, Step Functions and AWS DevOps Agent.
What you’ll learn
- Diagnose why an instance is missing from Systems Manager by checking the SSM Agent, its credentials (instance profile or Default Host Management Configuration), and the network path
- Use Session Manager and Run Command safely: session logging limits, port forwarding, and max concurrency versus max errors
- Build Automation runbooks with the right step actions, approval gates and delegated execution through AutomationAssumeRole
- Design an automated patching campaign with patch baselines, maintenance windows or patch policies, reboot options and compliance reporting
- Enforce configuration with State Manager, report fleet state with Inventory, and resolve Parameter Store values at the right time
- Build event-driven automation with EventBridge rules and Scheduler, S3 Event Notifications, Lambda and Step Functions
- Explain what AWS DevOps Agent does and choose the option with the least operational overhead
The 12 parts · about 18 min of reading
- Managed instancesStart hereA managed node needs a running SSM Agent, credentials from an instance profile or DHMC, and outbound HTTPS to the core endpoints.2 min
- Session ManagerSession Manager brokers IAM-controlled shells over the agent's outbound link; logging covers shell sessions, not SSH or port forwarding.2 min
- Run CommandRun Command runs one document once across tagged instances, with concurrency and error brakes; full output goes to S3 or CloudWatch Logs.1 min
- Automation runbooksRunbooks chain API calls, scripts, commands and approvals; AWSSupport runbooks repair access and AutomationAssumeRole delegates rights.2 min
- Patch Manager and maintenance windowsBaselines decide which patches, windows or patch policies decide when, Scan or Install acts, and compliance states prove the result.2 min
- State Manager, Inventory, and Parameter StoreAssociations enforce desired state, Inventory and data sync show the fleet, and Parameter Store tiers and references hold configuration.2 min
- Choosing the right Systems Manager capabilityPick by cadence, shape and domain: Run Command for one-offs, runbooks for multi-step work, State Manager to enforce, Patch Manager to patch.1 min
- Event-driven automationEventBridge rules match events and route them to targets; rules are Regional, input transformers shape input, Scheduler handles time zones.2 min
- S3 Event Notifications and EventBridge for S3S3 Event Notifications send filtered events to Lambda, SQS or SNS; turning on EventBridge for the bucket adds rich filtering and any target.1 min
- Lambda and Step FunctionsLambda runs custom logic; Step Functions Standard runs up to a year with task-token callbacks, while Express runs up to five minutes.1 min
- AWS DevOps AgentDevOps Agent investigates alerts, names a probable root cause and suggests mitigation; it changes nothing unless actions are enabled.1 min
- Automating processes end to endChain schedules, runbooks, Parameter Store and instance refresh, and prefer managed, declarative options over custom Lambda code.1 min
Mind map
How the exam tests this
Task 3.2 questions hand you an operational requirement and make you pick the automation primitive — then test the detail that makes it work. Session Manager questions turn on logging limits, port forwarding and the alternatives that need port 22; managed-node questions on the agent version, Default Host Management Configuration and endpoint DNS and security groups; Run Command on max concurrency versus max errors; runbooks on aws:approve versus aws:pause, step actions and AutomationAssumeRole; Patch Manager on approval delay versus cutoff date, reboot options, compliance states and where rate controls live; Parameter Store on tiers, policies and when references resolve; event-driven questions on Regional rules, UTC versus Scheduler time zones, S3 notification overlap and destination validation, Standard versus Express workflows, and what AWS DevOps Agent does by default versus with directed actions. Expect 'least operational overhead' discriminators where a predefined runbook or managed feature beats custom Lambda code.
Key takeaways
- A managed node needs a running (recent enough) SSM Agent, credentials from an instance profile or Default Host Management Configuration (IMDSv2, agent 3.2.582.0+), and a path to the ssm, ssmmessages and ec2messages endpoints.
- Interface endpoints only work with private DNS enabled and a security group allowing HTTPS 443 from the nodes; S3, KMS and Logs endpoints serve patching, encryption and logging, not registration.
- Session Manager needs no inbound ports; session logging does not cover SSH or port-forwarding sessions, and CloudTrail records StartSession but not the commands.
- Run Command max concurrency limits parallelism; max errors stops sending once failures exceed the value. Send full output to S3 or CloudWatch Logs.
- Runbooks: aws:approve gates on named approvers with a recorded decision; aws:pause just waits for a resume. AutomationAssumeRole plus iam:PassRole enables delegated execution.
- Configuration that must stay enforced over time belongs in a State Manager association; OS patching with approval rules is Patch Manager running AWS-RunPatchBaseline (Scan or Install).
- An auto-approval delay approves different patch sets on different run dates; an approval cutoff date gives every environment the identical set. Rate controls live on the task, not the baseline.
- NoReboot leaves patches InstalledPendingReboot and the node non-compliant until a reboot and a new scan.
- EventBridge rules are Regional and their schedules are UTC; EventBridge Scheduler adds time zones, one-time schedules and delete-after-completion.
- S3 Event Notifications go to Lambda, SQS or SNS and reject overlapping filters; turn on EventBridge for the bucket for content filtering and any target.
- AWS DevOps Agent investigates alerts and recommends mitigations; it changes resources only through opt-in directed actions that an operator approves.
- Prefer a managed, declarative feature or predefined runbook over custom Lambda code when the requirement is the least operational overhead.
Part 1: Managed instances
A managed node needs a running SSM Agent, credentials from an instance profile or DHMC, and outbound HTTPS to the core endpoints.
Frequently asked questions
Why is my EC2 instance not showing up in Systems Manager?
One of three prerequisites is missing. The SSM Agent may be absent, stopped or too old; the agent may lack credentials (no instance profile with AmazonSSMManagedInstanceCore, or, under Default Host Management Configuration, an instance that does not use IMDSv2 or runs an agent older than 3.2.582.0); or the agent may have no network path to the Systems Manager endpoints — typically a private subnet with no NAT gateway and no interface endpoints for ssm, ssmmessages and ec2messages, or endpoints without private DNS or a security group that allows HTTPS from the instances.
Can I manage EC2 instances with Systems Manager without an instance profile?
Yes. Turn on Default Host Management Configuration for the account and Region and choose the IAM role Systems Manager should use. Systems Manager then provides credentials to every EC2 instance in that Region that uses IMDSv2 and runs SSM Agent 3.2.582.0 or later, with no instance profile attached. The role is an account-level setting, not something you attach to instances.
Does Session Manager log every session?
No. When session logging to CloudWatch Logs or S3 is turned on, it captures commands and output for standard shell sessions, but logging is not available for sessions that connect through SSH or port forwarding. CloudTrail records the StartSession API call for every session, showing who connected to which instance and when, but not the commands run inside it.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.