aws-iot-shadow-rest-api

HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions ???

This simple script implements the following aws iot calls via Rest Api:

  1. GetThingShadow
  2. UpdateThingShadow
  3. ListNamedShadowForThing

NB: You must enable your device via this aws policy:

{
"Effect": "Allow",
"Action": [
"iot:GetThingShadow",
"iot:UpdateThingShadow",
"iot:DeleteThingShadow"
],
"Resource": "arn:aws:iot:ca-central-1:XXXXXXXXXXXX:thing/${iot:Connection.Thing.ThingName}"
}

See the official documentation here and here.

Installation

Run the following command to install all the necessary dependencies:

pip install -r requirements.txt

Usage

  1. Edit app-config.json and modify properties by entering your data (e.g. AWS API Secrets, endpoint url etc).

  2. Launch api-client.py:

python3 api-client.py
  1. You will be offered 3 options:
Type 1 for GetThingShadow, 2 for UpdateThingShadow, 3 for ListNamedShadowsForThing
  1. Choose the preferred option and test the corresponding shadow action, via REST Api call.

GitHub

https://github.com/AIIIXIII/aws-iot-shadow-rest-api