AWS Systems Manager documents - AWS Systems Manager

AWS Systems Manager documents

An AWS Systems Manager document (SSM document) defines the actions that Systems Manager performs on your managed instances. Systems Manager includes more than 100 pre-configured documents that you can use by specifying parameters at runtime. Pre-configured documents can be found in the Systems Manager Documents console by choosing the Owned by Amazon tab, or by specifying Amazon for the Owner filter when calling the ListDocuments API operation. Documents use JavaScript Object Notation (JSON) or YAML, and they include steps and parameters that you specify.

Types of SSM documents

The following table describes the different types of SSM documents.

Type Use with Details

Command document

Run Command

State Manager

Maintenance Windows

Run Command, a capability of AWS Systems Manager, uses Command documents to run commands. State Manager, a capability of AWS Systems Manager, uses command documents to apply a configuration. These actions can be run on one or more targets at any point during the lifecycle of an instance. Maintenance Windows, a capability of AWS Systems Manager, uses Command documents to apply a configuration based on the specified schedule.

Most Command documents are supported on all Linux and Windows Server operating systems supported by Systems Manager. The following Command documents are supported on Amazon Elastic Compute Cloud (Amazon EC2) instances for macOS:

  • AWS-ConfigureAWSPackage

  • AWS-RunPatchBaseline

  • AWS-RunPatchBaselineAssociation

  • AWS-RunShellScript

Automation runbook

Automation

State Manager

Maintenance Windows

Use Automation runbooks when performing common maintenance and deployment tasks such as creating or updating an Amazon Machine Image (AMI). State Manager uses Automation runbooks to apply a configuration. These actions can be run on one or more targets at any point during the lifecycle of an instance. Maintenance Windows uses Automation runbooks to perform common maintenance and deployment tasks based on the specified schedule.

All Automation runbooks that are supported for Linux-based operating systems are also supported on EC2 instances for macOS.

Package document

Distributor

In Distributor, a capability of AWS Systems Manager, a package is represented by an SSM document. A package document includes attached ZIP archive files that contain software or assets to install on managed instances. Creating a package in Distributor creates the package document.

Distributor isn't supported on Oracle Linux and macOS managed instances.

Session document

Session Manager

Session Manager, a capability of AWS Systems Manager, uses Session documents to determine which type of session to start, such as a port forwarding session, a session to run an interactive command, or a session to create an SSH tunnel.

Session documents are supported on all Linux and Windows Server operating systems supported by Systems Manager. The following Command documents are supported on EC2 instances for macOS:

  • AWS-PasswordReset

  • AWS-StartInteractiveCommand

  • AWS-StartPortForwardingSession

  • AWS-StartPortForwardingSessionToSocket

  • AWS-StartSSHSession

Policy document

State Manager

Inventory, a capability of AWS Systems Manager, uses the AWS-GatherSoftwareInventory Policy document with a State Manager association to collect inventory data from managed instances. When creating your own SSM documents, Automation runbooks and Command documents are the preferred method for enforcing a policy on a managed instance.

Systems Manager Inventory and the AWS-GatherSoftwareInventory Policy document are supported on all operating systems supported by Systems Manager.

Change Calendar document

Change Calendar

Change Calendar, a capability of AWS Systems Manager, uses the ChangeCalendar document type. A Change Calendar document stores a calendar entry and associated events that can allow or prevent Automation actions from changing your environment. In Change Calendar, a document stores iCalendar 2.0 data in plaintext format.

Change Calendar isn't supported on EC2 instances for macOS.

AWS CloudFormation template

AWS CloudFormation

AWS CloudFormation templates describe the resources that you want to provision in your CloudFormation stacks. Storing CloudFormation templates as Systems Manager documents allows you to benefit from Systems Manager document features. These include creating and comparing multiple versions of your template, and sharing your template with other accounts in the same AWS Region.

You can create and edit CloudFormation templates and stacks by using Application Manager, a capability of Systems Manager. For more information, see Working with AWS CloudFormation templates and stacks in Application Manager

Post-incident analysis template

Incident Manager post-incident analysis

Incident Manager uses the post-incident analysis template to create an analysis based on AWS operations management best practices.

Use the template to create an analysis that your team can use to dive into identifying improvements to your incident response.

Using SSM document versions

You can create and save different versions of documents. You can then specify a default version for each document. The default version of a document can be updated to a newer version or reverted to an older version of the document. When you change the content of a document, Systems Manager automatically increments the version of the document. You can retrieve or use any version of a document by specifying the document version in the console, CLI commands, or API calls.

Viewing document content and required parameters

To identify the required and optional parameters for an SSM document, in addition to the actions it runs, you can view the content of the document in the Systems Manager console. For information, see Viewing SSM Command document content.

Customizing a document

If you want to customize the steps and actions in a document, you can create your own. The first time you use a document to perform an action on an instance, the system stores the document with your AWS account. For more information about how to create an SSM document, see Creating SSM documents.

Tagging a document

You can tag your documents to help you quickly identify one or more documents based on the tags you've assigned to them. For example, you can tag documents for specific environments, departments, users, groups, or periods. You can also restrict access to documents by creating an AWS Identity and Access Management (IAM) policy that specifies the tags that a user or group can access. For more information, see Tagging Systems Manager documents.

Sharing a document

You can make your documents public or share them with specific AWS accounts in the same AWS Region. Sharing documents between accounts can be useful if, for example, you want all of the EC2 instances that you supply to customers or employees to have the same configuration. In addition to keeping applications or patches on the instances up-to-date, you might want to restrict customer instances from certain activities. Or you might want to ensure that the instances used by employee accounts throughout your organization are granted access to specific internal resources. For more information, see Sharing SSM documents.

SSM document quotas

For information about SSM document quotas, see Systems Manager service quotas in the Amazon Web Services General Reference.