In this step, we will configure the Kinesis Data Generator to generate dummy data and feed it to Kinesis Firehose.
Configure Amazon Cognito for Kinesis Data Generator - In this step, we will launch a stack cloud formation to configure Cognito. These cloudformation script files will be launched in the N.Virginia region (No need to change this region).
Go to CloudFormation or Github
Log in with the username and password from the previous step Region: us-east-1 Stream/delivery stream: analytics-workshop-stream Records per second: 2000 Record Template (Sample 1): In the large text area, insert the following json template:
{
"uuid": "{{random.uuid}}",
"device_ts": "{{date.utc("YYYY-MM-DD HH:mm:ss.SSS")}}",
"device_id": {{random.number(50)}},
"device_temp": {{random.weightedArrayElement(
{"weights":[0.30, 0.30, 0.20, 0.20],"data":[32, 34, 28, 40]}
)}},
"track_id": {{random.number(30)}},
"activity_type": {{random.weightedArrayElement(
{
"weights": [0.1, 0.2, 0.2, 0.3, 0.2],
"data": ["\"Running\"", "\"Working\"", "\"Walking\"", "\"Traveling\"", "\"Sitting\""]
}
)}}
}