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 ]



Bulk update custom inventory items on one more instance. The request adds an inventory item, if it doesn't already exist, or updates an inventory item, if it does exist.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


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


--instance-id (string)

An instance ID where you want to add or update inventory items.

--items (list)

The inventory items that you want to add or update on instances.


Information collected from managed instances based on your inventory policy document

TypeName -> (string)

The name of the inventory type. Default inventory item type names start with AWS. Custom inventory type names will start with Custom. Default inventory item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, AWS:Network, and AWS:WindowsUpdate.

SchemaVersion -> (string)

The schema version for the inventory item.

CaptureTime -> (string)

The time the inventory information was collected.

ContentHash -> (string)

MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API does not update the inventory item type contents if the MD5 hash has not changed since last update.

Content -> (list)

The inventory data of the inventory type.


key -> (string)

value -> (string)

Context -> (map)

A map of associated properties for a specified inventory type. For example, with this attribute, you can specify the ExecutionId , ExecutionType , ComplianceType properties of the AWS:ComplianceItem type.

key -> (string)

value -> (string)

Shorthand Syntax:

TypeName=string,SchemaVersion=string,CaptureTime=string,ContentHash=string,Content=[{KeyName1=string,KeyName2=string},{KeyName1=string,KeyName2=string}],Context={KeyName1=string,KeyName2=string} ...

JSON Syntax:

    "TypeName": "string",
    "SchemaVersion": "string",
    "CaptureTime": "string",
    "ContentHash": "string",
    "Content": [
      {"string": "string"
    "Context": {"string": "string"

--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 assign customer metadata to an instance

This example assigns rack location information to an instance. There is no output if the command succeeds.

Command (Linux):

aws ssm put-inventory --instance-id "i-016648b75dd622dab" --items '[{"TypeName": "Custom:RackInfo","SchemaVersion": "1.0","CaptureTime": "2019-01-22T10:01:01Z","Content":[{"RackLocation": "Bay B/Row C/Rack D/Shelf E"}]}]'

Command (Windows):

aws ssm put-inventory --instance-id "i-016648b75dd622dab" --items "TypeName=Custom:RackInfo,SchemaVersion=1.0,CaptureTime=2019-01-22T10:01:01Z,Content=[{RackLocation='Bay B/Row C/Rack D/Shelf F'}]"


Message -> (string)

Information about the request.