Important AWS IOT CLI Commands

In this post, we are going to list out some of the important Aws Cli Commands which are very frequently used. You Can also watch the video on YouTube and follow along with the tutorial.

For Creating a Thing Using Aws CLI

aws iot create-thing –thing-name Dog1

For Creating a Thing Group Name Using AWS CLI

aws iot create-thing-group –thing-group-name Animals  

For Creating a thing Type using CLI

aws iot create-thing-type –thing-type-name Dogs

For Creating a Thing on IOT with Thing Type Name

aws iot create-thing –thing-name Dog1 –thing-type-name Dogs

For Updating a Thing on IOT with Thing Type

aws iot update-thing –thing-name Dog1 –thing-type-name Dogs  

For Describing a thing using CLI

aws iot describe-thing –thing-name Dog1  
Note: Things with a thing type can have up to 50 attributes. Things without a thing type can have up to three attributes.  

For Updating an Attribute for a thing

aws iot update-thing –thing-name Dog1 –thing-type-name Dogs –attribute-payload {\”attributes\”:{\”dogName\”:\”lucy\”}}  

For Creating/Updating a classic shadow using Cli

aws iot-data update-thing-shadow –thing-name Dog1  –cli-binary-format raw-in-base64-out –payload “{\”state\”: {\”reported\”: {\”Name\”: \”Lucy\”}}}” response.json  

For Creating/Updating Named Shadow Using CLI

aws iot-data update-thing-shadow –thing-name Dog1 –shadow-name dog_details –cli-binary-format raw-in-base64-out –payload “{\”state\”: {\”reported\”: {\”Name\”: \”Lucy\”}}}” response.json  

Leave a Reply