Use these actions to create, run, and manage AWS Systems Manager automation documents.
Prerequisites
For prerequisites and credentials setup, see Set up AWS credentials.
Create a document
Action identifier: aws.systemsManager.writeDocument
Creates or updates an SSM document in your AWS account. See AWS Systems Manager documentation.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the document will be created. |
|
| String | Required. Name for the SSM document. |
|
| String | Optional. Type of SSM document. Valid values are listed in the AWS Systems Manager API Reference. |
|
| String | Optional. Format of the document content. Valid values: |
|
| String | Required. The SSM document content as a string. | See the example below. |
| Boolean | Optional. When |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| String |
|
| String |
|
| String |
|
| String |
|
| Boolean |
|
| String |
|
SSM document content:
schemaVersion: '0.3'description: List all Lambda function names.mainSteps: - name: ExecuteAwsApi action: aws:executeAwsApi isEnd: true inputs: Service: lambda Api: ListFunctions outputs: - Name: resultFunctionName Selector: $..FunctionName Type: StringListoutputs: - ExecuteAwsApi.resultFunctionNameComplete workflow using this document:
name: aws-apiworkflowInputs: key: type: String defaultValue: "${{ :secrets:11933347:USERNAME_AWS_ACCESS_KEY_ID }}" access: type: String defaultValue: "${{ :secrets:11933347:USERNAME_AWS_SECRET_ACCESS_KEY }}" token: type: String defaultValue: "${{ :secrets:11933347:USERNAME_AWS_SESSION_TOKEN }}" region: type: String defaultValue: us-east-2steps: - name: createSsmDocument type: action action: aws.systemsManager.writeDocument version: 1 inputs: awsAccessKeyId: ${{ .workflowInputs.key }} awsSecretAccessKey: ${{ .workflowInputs.access }} awsSessionToken: ${{ .workflowInputs.token }} region: ${{ .workflowInputs.region }} documentName: "LambdaListFunctionNames" documentContent: | schemaVersion: '0.3' description: List all Lambda function names. mainSteps: - name: ExecuteAwsApi action: aws:executeAwsApi isEnd: true inputs: Service: lambda Api: ListFunctions outputs: - Name: resultFunctionName Selector: $..FunctionName Type: StringList outputs: - ExecuteAwsApi.resultFunctionName - name: start1 type: action action: aws.systemsManager.startAutomation version: 1 inputs: awsAccessKeyId: ${{ .workflowInputs.key }} awsSecretAccessKey: ${{ .workflowInputs.access }} awsSessionToken: ${{ .workflowInputs.token }} region: ${{ .workflowInputs.region }} documentName: "${{ .steps.createSsmDocument.outputs.documentName }}"Delete a document
Action identifier: aws.systemsManager.deleteDocument
Deletes an AWS SSM document from your account. See AWS Systems Manager documentation.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the document is located. |
|
| String | Required. Name of the SSM document to delete. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| String |
|
| Boolean |
|
| String |
|
Start an automation
Action identifier: aws.systemsManager.startAutomation
Starts an automation using an AWS SSM document. See AWS Systems Manager documentation.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the SSM document is located. |
|
| String | Required. Name of the SSM document to execute. |
|
| Map | Optional. Key-value pairs to pass as parameters to the SSM document. |
|
| UUID | Optional. Passed as the client token for idempotency when starting the automation. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| String |
|
| Boolean |
|
| String |
|
Wait for automation status
Action identifier: aws.systemsManager.waitForAutomationStatus
Polls an AWS SSM automation execution until it reaches one of the specified terminal statuses or the timeout expires. See AWS Systems Manager documentation.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the automation execution is running. |
|
| String | Required. The execution ID to wait on. |
|
| List | Optional. List of AutomationExecution statuses that stop the wait. Default: |
|
| Int | Optional. Duration in seconds to wait. Default is |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Output | Type | Example |
|---|---|---|
| String |
|
| String |
|
| Map |
|
| Boolean |
|
| String |
|