Created
June 27, 2020 10:56
-
-
Save bdnf/78985d0faf47173bd866de90f7065536 to your computer and use it in GitHub Desktop.
Simulate heart rate data from sensor and stream it to AWS Kinesis Stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while true | |
do | |
deviceID=$(( ( RANDOM % 10 ) + 1 )) | |
heartRate=$(jot -r 1 60 140) | |
echo "$deviceID,$heartRate" | |
aws kinesis put-record --stream-name <your_stream_name> --data "$deviceID,$heartRate"$'\n' --partition-key $deviceID --region us-east-1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment