Table Of Contents


User Guide

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

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . ssm ]



Shares a Systems Manager document publicly or privately. If you share a document privately, you must specify the AWS user account IDs for those people who can use the document. If you share a document publicly, you must specify All as the account ID.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--name <value>
--permission-type <value>
[--account-ids-to-add <value>]
[--account-ids-to-remove <value>]
[--shared-document-version <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--name (string)

The name of the document that you want to share.

--permission-type (string)

The permission type for the document. The permission type can be Share .

Possible values:

  • Share

--account-ids-to-add (list)

The AWS user accounts that should have access to the document. The account IDs can either be a group of account IDs or All .



"string" "string" ...

--account-ids-to-remove (list)

The AWS user accounts that should no longer have access to the document. The AWS user account can either be a group of account IDs or All . This action has a higher priority than AccountIdsToAdd . If you specify an account ID to add and the same ID to remove, the system removes access to the document.



"string" "string" ...

--shared-document-version (string)

(Optional) The version of the document to share. If it's not specified, the system choose the Default version to share.

--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. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--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 modify document permissions

The following modify-document-permission example shares a Systems Manager document publicly.

aws ssm modify-document-permission \
    --name "Example" \
    --permission-type "Share" \
    --account-ids-to-add "All"

This command produces no output.

For more information, see Share a Systems Manager Document in the AWS Systems Manager User Guide.