Automation System Variables
This section describes variable and parameter uses in Systems Manager Automation documents.
System Variables
Automation documents currently support the following system variables.
| Variable | Details |
|---|---|
|
global:DATE |
The date (at execution time) in the format yyyy-MM-dd. |
|
global:DATE_TIME |
The date and time (at execution time) in the format yyyy-MM-dd_HH.mm.ss. |
|
global:REGION |
The region which the document is executed in. For example, us-east-1. |
Automation Variables
Automation documents currently support the following automation variables.
| Variable | Details |
|---|---|
|
automation:EXECUTION_ID |
The unique identifier assigned to the current automation execution. For example 1a2b3c-1a2b3c-1a2b3c-1a2b3c1a2b3c1a2b3c. |
Terminology
This section uses the following terms to describe how variables and parameters are resolved.
| Term | Definition | Example |
|---|---|---|
|
Constant ARN |
A valid ARN without variables |
arn:aws:iam::123456789012:role/roleName |
|
Document Parameter |
A parameter defined at the document level for an Automation document (for example, instanceId). The parameter is used in a basic string replace. Its value is supplied at Start Execution time. |
|
|
System variable |
A general variable substituted into the document when any part of the document is evaluated. |
|
|
Automation variable |
A variable relating to the automation execution substituted into the document when any part of the document is evaluated. |
|
|
SSM parameter |
A variable defined within the Parameter Service. It is not declared as a Document Parameter. It may require permissions to access. |
|
Supported Scenarios
| Scenario | Comments | Example |
|---|---|---|
|
Constant ARN assumeRole at create |
An authorization check will be performed to check the calling user is permitted to pass the given assume role. |
|
|
Document Parameter supplied for assumeRole at create |
Must be defined in the Parameter list of the document. |
|
|
Value supplied for Document Parameter at start. |
Customer supplies the value to use for a parameter. Any execution inputs supplied at start time need to be defined in the parameter list of the document. |
Inputs to Start Automation Execution include : {"amiId" : ["ami-12345678"] } |
|
SSM parameter referenced within step definition |
The variable exists within the customers account and the assumeRole for the document has access to the variable. A check will be performed at create time to confirm the assumeRole has access. SSM parameters do not need to be set in the parameter list of the document. |
|
|
System variable referenced within step definition |
A system variable is substituted into the document at execution time. The value injected into the document is relative to when the substitution occurs. e.g. The value of a time variable injected at step 1 will be different to the value injected at step 3 due to the time taken to execute the steps between. System variables do not need to be set in the parameter list of the document. |
|
|
Automation variable referenced within step definition. |
Automation variables do not need to be set in the parameter list of the document. The only supported Automation variable is automation:EXECUTION_ID. |
|
|
Refer to output from previous step within next step definition. |
This is parameter redirection. The output of a previous step is referenced using the syntax {{stepName.OutputName}}. This syntax cannot be used by the customer for Document Parameters. This is resolved at the time of execution for the referring step. The parameter is not listed in the parameters of the document. |
|
Unsupported Scenarios
| Scenario | Comment | Example |
|---|---|---|
|
SSM Parameter supplied for assumeRole at create |
Not supported. |
|
|
SSM Parameter supplied for Document Parameter at start |
The user supplies an input parameter at start time which is an SSM parameter |
|
|
Variable step definition |
The definition of a step in the document is constructed by variables. |
|
|
Cross referencing Document Parameters |
The user supplies an input parameter at start time which is a reference to another parameter in the document. |
|
|
Multi-level expansion |
The document defines a variable which evaluates to the name of a variable. This sits within the variable delimeters (that is {{ }}) and is expanded to the value of that variable/parameter. |
|

