In this step, we will configure Kinesis Data Generator (KDG) to generate sample data and push it to Amazon Data Firehose. KDG is a web-based tool that simplifies sending test data to Kinesis streams/Firehose.
The Kinesis Data Generator requires an Amazon Cognito user pool for authentication. We will deploy a CloudFormation stack to automatically set up Cognito and generate the KDG login URL.
Access the AWS Management Console.

In the CloudFormation interface.

Download the cognito-setup.yaml file from First Cloud AI Journey.
In the Create stack interface.

In the Specify stack details interface.
Kinesis-Data-Generator-Cognito-User.true.kdguser.
In the Configure stack options interface.

In the Review and create interface.

Wait for about 3 minutes to complete the stack creation.

After the stack is created successfully.

In the Stack interface.

In the Amazon Kinesis Data Generator interface.
kdguser.
If the Kinesis Data Generator shows an error about configuration, go back to CloudFormation Outputs tab.

Scroll up in the Outputs tab to see all 6 output values.

In the Amazon Kinesis Data Generator, click Configure.

After successful configuration and login.
ap-southeast-1).
Enter the following code in the Template 1 editor:
{
"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.

Select the raw2026 folder inside the data folder.

The data has been successfully sent to S3.
