Skip to content

HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions πŸ’»πŸŒπŸ’‘

Notifications You must be signed in to change notification settings

AIIIXIII/aws-iot-shadow-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions πŸ’»πŸŒπŸ’‘

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published