Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ssm ]



Gets the contents of the specified Systems Manager document.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--name <value>
[--document-version <value>]
[--document-format <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--name (string)

The name of the Systems Manager document.

--document-version (string)

The document version for which you want information.

--document-format (string)

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

Possible values:

  • YAML
  • JSON

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To get the contents of a document

This example returns the content of a document.


aws ssm get-document --name "RunShellScript"


  "Content": "{\n   \"schemaVersion\":\"2.0\",\n   \"description\":\"Run a script\",\n   \"parameters\":{\n      \"commands\":{\n         \"type\":\"StringList\",\n         \"description\":\"(Required) Specify a shell script or a command to run.\",\n         \"minItems\":1,\n         \"displayType\":\"textarea\"\n      }\n   },\n   \"mainSteps\":[\n      {\n         \"action\":\"aws:runShellScript\",\n         \"name\":\"runShellScript\",\n         \"inputs\":{\n            \"commands\":\"{{ commands }}\"\n         }\n      },\n      {\n         \"action\":\"aws:runPowerShellScript\",\n         \"name\":\"runPowerShellScript\",\n         \"inputs\":{\n            \"commands\":\"{{ commands }}\"\n         }\n      }\n   ]\n}\n",
  "Name": "RunShellScript.json",
  "DocumentVersion": "1",
  "DocumentType": "Command"


Name -> (string)

The name of the Systems Manager document.

DocumentVersion -> (string)

The document version.

Content -> (string)

The contents of the Systems Manager document.

DocumentType -> (string)

The document type.

DocumentFormat -> (string)

The document format, either JSON or YAML.