Specifying cloud providers for SSM documents
The cloud providers of an SSM document are metadata that declare which clouds the
document runs on. The values are AWS, Azure, and GCP.
Cloud providers apply to Automation runbooks. Use them to declare that a runbook works
with Microsoft Azure or Google Cloud resources, in addition
to or instead of AWS resources.
You set cloud providers when you create or update a runbook. In the visual design experience, you set them on the runbook's attributes instead. For more information, see Using Azure and Google Cloud actions in the visual design experience.
How the Automation console uses cloud providers
The Automation console reads a runbook's cloud providers and adapts the Execute automation page:
-
The console offers the Multi-account and Region execution mode only when the runbook's cloud providers include
AWS. -
For a runbook whose cloud providers don't include
AWS, the Targets list offers Cloud Connector and Parameter Values, and selects Cloud Connector for you. -
For a Cloud Connector target, the console shows the filters for the runbook's cloud. If you choose a connector for a cloud that the runbook doesn't list, the console shows a warning, but you can still run the automation.
-
The runbook details on the Execute automation page show the runbook's Cloud providers.
-
The runbook picker and the Systems Manager Documents page show a Cloud providers column and filter.
Rules for cloud providers
-
A document can have 1 to 10 cloud providers, from the values
AWS,Azure, andGCP. The values are case-sensitive. -
Cloud providers are stored per document version as metadata, not in the document content.
-
A new document created without cloud providers is treated as
AWS. An update that doesn't specify cloud providers copies the value from the latest version. Changing only the cloud providers creates a new document version. -
The
DescribeDocument,ListDocuments, andListDocumentVersionsoperations return cloud providers. TheGetDocumentoperation doesn't.
Setting cloud providers with the AWS CLI
Use the cloud-providers parameter with the create-document
and update-document commands. In the following commands, replace
MyRunbook and the content file with your own
information.
Viewing cloud providers
To view a runbook's cloud providers with the command line, run the
describe-document command and read the CloudProviders
field in the output.
aws ssm describe-document --name "MyRunbook"
In the Systems Manager console, the details of a document on the Documents page include a Cloud providers field, and the documents list has a Cloud providers column.
Searching by cloud provider
Use the CloudProviders filter with the list-documents command
to find documents by cloud. The filter matches a document that has any of the values you
specify. Documents without stored cloud providers match AWS.
aws ssm list-documents --filters Key=CloudProviders,Values=Azure
For more ways to search for SSM documents, see Searching for SSM documents.
Errors
Setting cloud providers can return the following errors:
-
CloudProviders must contain at least one cloud provider. -
CloudProviders must not contain duplicate values. -
<value> is not a supported cloud provider. Supported values: AWS, Azure, GCP