Deleting custom SSM documents
If you no longer want to use a custom SSM document, you can delete it by using either the Amazon Command Line Interface (Amazon CLI) or the Amazon Systems Manager console.
To delete an SSM document (Amazon CLI)
-
Before you delete the document, we recommend that you disassociate all instances that are associated with the document.
Run the following command to disassociate an instance from a document.
aws ssm delete-association --instance-id "123456789012" --name "
documentName
"There is no output if the command succeeds.
-
Run the following command. Replace each
example resource placeholder
with your own information.There is no output if the command succeeds.
Important If the
document-version
or theversion-name
are not provided, all versions of the document are deleted.
To delete an SSM document (console)
Open the Amazon Systems Manager console at https://console.amazonaws.cn/systems-manager/
. In the navigation pane, choose Documents.
-or-
If the Amazon Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Documents in the navigation pane.
-
Select the document you want to delete.
-
Select Delete. When prompted to delete the document, select Delete.