Skip to content

Instantly share code, notes, and snippets.

@douglascayers
Created August 7, 2023 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglascayers/e3c4ba18cc02f39f02b332595517d4cd to your computer and use it in GitHub Desktop.
Save douglascayers/e3c4ba18cc02f39f02b332595517d4cd to your computer and use it in GitHub Desktop.
Adds a AWS IOT thing to a group
#!/bin/bash
set -e
THING_GROUP_NAME="changeme"
THING_NAMES=(
"thing1"
"thing2"
)
for THING_NAME in "${THING_NAMES[@]}"; do
echo "Adding ${THING_NAME} to group ${THING_GROUP_NAME}"
aws iot add-thing-to-thing-group \
--thing-group-name ${THING_GROUP_NAME} \
--thing-name ${THING_NAME}
done
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment