In this step, we will configure Kinesis Data Generator to generate sample data and push it to Kinesis Firehose.
Access the AWS Management Console.
In the CloudFormation interface.
Download the cognito-setup.json file from First Cloud Journey.
In the Create stack interface.
In the Specify stack details interface.
Kinesis-Data-Generator-Cognito-User
.admin
.Choose Next.
In the Create stack interface.
Wait for about 5 minutes to complete the stack creation.
In the Stack interface.
In the Amazon Kinesis Data Generator interface, complete the information entry (this information you configured in the stack creation step).
In the Amazon Kinesis Data Generator interface, after successfully logging in.
{
"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\""]
}
)}}
}
After sending approximately ~ 100,000 messages.
Check to ensure that the data has been sent to S3. Access the AWS Management Console.
In the S3 interface.
In the Bucket interface.
Then, select the raw2022 folder.
That’s it, the data has been sent to S3.