Table Of Contents


User Guide

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

[ aws . ssm ]



Retrieves the current snapshot for the patch baseline the instance uses. This API is primarily used by the AWS-RunPatchBaseline Systems Manager document.

See also: AWS API Documentation


--instance-id <value>
--snapshot-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--instance-id (string)

The ID of the instance for which the appropriate patch snapshot should be retrieved.

--snapshot-id (string)

The user-defined snapshot ID.

--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.


To retrieve the current snapshot for the patch baseline an instance uses

This example displays the current snapshot for the patch baseline used by an Instance. This command must be run from the instance using the instance credentials. To ensure it uses the instance credentials, run aws configure and only specify the region of your instance but leave the Access Key and Secret Key fields blank.

Use uuidgen to generate a snapshot-id.


aws ssm get-deployable-patch-snapshot-for-instance --instance-id "i-0cb2b964d3e14fd9f" --snapshot-id "4681775b-098f-4435-a956-0ef33373ac11"


  "InstanceId": "i-0cb2b964d3e14fd9f",
  "SnapshotId": "4681775b-098f-4435-a956-0ef33373ac11",
  "SnapshotDownloadUrl": ""


InstanceId -> (string)

The ID of the instance.

SnapshotId -> (string)

The user-defined snapshot ID.

SnapshotDownloadUrl -> (string)

A pre-signed Amazon S3 URL that can be used to download the patch snapshot.

Product -> (string)

Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the instance for the specified patch snapshot.