AWS Certified Solutions Architect – Professional
Systems Manager Automation across accounts and Regions: SAP-C03
The Systems Manager User Guide says a central account starts one automation that runs the runbook in each target account and Region. To target OUs, the central account must be the management account or a delegated administrator. Location concurrency limits how many account-Region pairs run at once. Concurrency and the error threshold limit resources inside each pair.
How a multi-account and multi-Region automation is set up
You run the automation from one central account. To target OUs, that account must be able to list the accounts in them, which only the organization's management account or a delegated administrator can do. AWS recommends a delegated administrator, registered for the ssm.amazonaws.com service principal. For accounts outside AWS Organizations, AWS recommends a dedicated automation account.
Two IAM roles are needed. AWS-SystemsManager-AutomationAdministrationRole exists only in the central account. AWS-SystemsManager-AutomationExecutionRole must exist in every target account, and AWS recommends CloudFormation StackSets to create it there. A custom runbook must also be shared with all target accounts.
You choose the runbook, the Regions, and the accounts or OUs. When resources are targeted by tags or a resource group, the automation finds the matching resources in each account and Region, so you do not list instance IDs. The central automation's step outputs are the IDs of the child automations in the target accounts.
Two levels of rate control
The first level counts locations. Five accounts in four Regions make 20 account-Region pairs. Location concurrency sets how many pairs run the automation at the same time, as a number or a percentage. AWS states that these options do not restrict the number of resources that run the automation.
The second level applies inside each pair. Concurrency sets how many targets run the automation at once, as a number or as a percentage of the target set. The most resources that can be running at one moment is therefore the number of concurrent pairs multiplied by the concurrency inside each pair.
The error threshold is how many automations may fail before Systems Manager stops sending the automation to more resources. With a threshold of 3 it stops at the fourth error. With 0 it stops after the first error. Automations that are already running are allowed to finish, and some of them may fail too. To be sure the failures never exceed the threshold, set concurrency to 1.
EventBridge triggers, approvals and Run Command
A runbook can be the target of an Amazon EventBridge rule, on a schedule or on an event such as an EC2 instance entering the running state. Events from AWS services in an account always go to that account's default event bus, so the rule belongs on the default bus. Every required runbook parameter needs a value. If one is missing, the rule is created but does not run.
The aws:approve action pauses an automation until the named approvers approve or reject it. It waits 7 days by default and 30 days at most. It does not support multi-account and Region automations.
Run Command has the same two controls for a command sent to many managed nodes, targeted by tags, resource groups or node IDs. max-concurrency defaults to 50 and max-errors defaults to 0. Invocations already running when the error limit is reached are allowed to complete.
Where the exam catches people
- Believing location concurrency limits how many instances run at once: it limits account-Region pairs only. The per-pair concurrency limits resources.
- Believing an error threshold of 0 guarantees a single failure: automations already in progress finish and can fail. Set concurrency to 1 as well.
- Believing the execution role is needed only in the central account:
AWS-SystemsManager-AutomationExecutionRolemust exist in every target account. - Believing an
aws:approvestep can gate a multi-account and Region automation: that action does not support them. - Believing a rule on a custom event bus receives EC2 state-change events: AWS service events go to the account's default event bus.