SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Deployment, Provisioning, and Automation

Systems Manager and event-driven automation: managing resources for SOA-C03

26 min readSOA-C03 · Deployment, Provisioning, and AutomationUpdated

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

  1. 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
  2. Session ManagerSession Manager brokers IAM-controlled shells over the agent's outbound link; logging covers shell sessions, not SSH or port forwarding.2 min
  3. 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
  4. Automation runbooksRunbooks chain API calls, scripts, commands and approvals; AWSSupport runbooks repair access and AutomationAssumeRole delegates rights.2 min
  5. 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
  6. 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
  7. 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
  8. Event-driven automationEventBridge rules match events and route them to targets; rules are Regional, input transformers shape input, Scheduler handles time zones.2 min
  9. 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
  10. 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
  11. AWS DevOps AgentDevOps Agent investigates alerts, names a probable root cause and suggests mitigation; it changes nothing unless actions are enabled.1 min
  12. 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

Agent, credentials and a network pathAmazonSSMManagedInstanceCore or DHMCDHMC needs IMDSv2 and agent 3.2.582.0+Endpoints need private DNS and inbound4431✓Managed instancesNo SSH keys, bastions or inbound portsLogs commands in shell sessions onlyCloudTrail logs StartSession, notcommandsPort forwarding reaches a private RDShost2✓Session ManagerOne document, once, targeted by tagsMax concurrency caps parallel targetsMax errors 0 stops after the firstfailureConsole shows 2,500 characters; sendto S33✓Run CommandAWSSupport-ResetAccess issues a newkeyaws:executeScript runs inline Pythonaws:approve records named approversAutomationAssumeRole plus PassRoledelegates4✓Automation runbooksAuto-approval delay vs fixed cutoffdateBlock keeps rejected dependencies offWindow cutoff stops new tasks; lowpriority firstNoReboot leaves InstalledPendingReboot5✓Patch Manager and windowsAssociations reapply and correct driftResource data sync to S3, query withAthenaAdvanced tier: 8 KB and parameterpoliciesresolve:ssm: resolves at every launch6✓State Manager andParameter StoreCadence: once vs continuousShape: one command vs multi-stepworkflowSession Manager is access, notautomationMaintenance window schedules riskywork7✓Choosing a capabilityRules see only their own Region'seventsInput transformers build the targetinputAPI destinations replace webhookLambdasScheduler handles time zones and DST8✓EventBridge rules andschedulesTargets: Lambda, SQS standard, SNSstandardOverlapping prefix filters arerejectedSSE-KMS destinations need a customerkeyEventBridge must be turned on perbucket9✓S3 notifications vsEventBridgeLambda runs custom logicStandard: up to a year, exactly onceExpress: up to five minutes, nocallbacksTask tokens pause for human approval10✓Lambda and Step FunctionsAlert-triggered incident investigationReturns root cause and mitigationstepsRead-only by default; people actDirected actions: opt-in,operator-approved11✓AWS DevOps AgentScheduler runs stop/start runbooksNew AMI IDs flow via Parameter StorePrefer managed options over customLambdaRead the verbs: once, enforce,schedule12✓Automating end to endSystems Manager andevent-drivenautomation
Mind map

Systems Manager and event-driven automation: managing resources for SOA-C03

Agent, credentials and a network pathAmazonSSMManagedInstanceCore or DHMCDHMC needs IMDSv2 and agent 3.2.582.0+Endpoints need private DNS and inbound4431✓Managed instancesNo SSH keys, bastions or inbound portsLogs commands in shell sessions onlyCloudTrail logs StartSession, notcommandsPort forwarding reaches a private RDShost2✓Session ManagerOne document, once, targeted by tagsMax concurrency caps parallel targetsMax errors 0 stops after the firstfailureConsole shows 2,500 characters; sendto S33✓Run CommandAWSSupport-ResetAccess issues a newkeyaws:executeScript runs inline Pythonaws:approve records named approversAutomationAssumeRole plus PassRoledelegates4✓Automation runbooksAuto-approval delay vs fixed cutoffdateBlock keeps rejected dependencies offWindow cutoff stops new tasks; lowpriority firstNoReboot leaves InstalledPendingReboot5✓Patch Manager and windowsAssociations reapply and correct driftResource data sync to S3, query withAthenaAdvanced tier: 8 KB and parameterpoliciesresolve:ssm: resolves at every launch6✓State Manager andParameter StoreCadence: once vs continuousShape: one command vs multi-stepworkflowSession Manager is access, notautomationMaintenance window schedules riskywork7✓Choosing a capabilityRules see only their own Region'seventsInput transformers build the targetinputAPI destinations replace webhookLambdasScheduler handles time zones and DST8✓EventBridge rules andschedulesTargets: Lambda, SQS standard, SNSstandardOverlapping prefix filters arerejectedSSE-KMS destinations need a customerkeyEventBridge must be turned on perbucket9✓S3 notifications vsEventBridgeLambda runs custom logicStandard: up to a year, exactly onceExpress: up to five minutes, nocallbacksTask tokens pause for human approval10✓Lambda and Step FunctionsAlert-triggered incident investigationReturns root cause and mitigationstepsRead-only by default; people actDirected actions: opt-in,operator-approved11✓AWS DevOps AgentScheduler runs stop/start runbooksNew AMI IDs flow via Parameter StorePrefer managed options over customLambdaRead the verbs: once, enforce,schedule12✓Automating end to endSystems Manager andevent-drivenautomation

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

  1. 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.
  2. 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.
  3. Session Manager needs no inbound ports; session logging does not cover SSH or port-forwarding sessions, and CloudTrail records StartSession but not the commands.
  4. Run Command max concurrency limits parallelism; max errors stops sending once failures exceed the value. Send full output to S3 or CloudWatch Logs.
  5. 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.
  6. 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).
  7. 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.
  8. NoReboot leaves patches InstalledPendingReboot and the node non-compliant until a reboot and a new scan.
  9. EventBridge rules are Regional and their schedules are UTC; EventBridge Scheduler adds time zones, one-time schedules and delete-after-completion.
  10. 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.
  11. AWS DevOps Agent investigates alerts and recommends mitigations; it changes resources only through opt-in directed actions that an operator approves.
  12. Prefer a managed, declarative feature or predefined runbook over custom Lambda code when the requirement is the least operational overhead.
0/12
Ready to start

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.

2 min read · 12 parts, about 18 min in allStart lesson

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.

Spotted a mistake in this lesson?