Sessionizing Clickstream Data with Amazon Kinesis Data Analytics

Lab Steps

Logging in to the Amazon Web Services Console
Creating an Amazon Kinesis Data Analytics Application
Connecting to the Virtual Machine using EC2 Instance Connect
Simulating a Real-Time Clickstream
Sessionizing the Clickstream Data using Amazon Kinesis Data Analytics
Creating an AWS Lambda function to Store Sessions in an Amazon DynamoDB Table
Configuring Amazon Kinesis Data Analytics to Use Your AWS Lambda Function as a Destination

Ready for the real environment experience?

Time Limit1h 30m


Amazon Kinesis Data Analytics is a fully-managed service that enables you to perform analysis using SQL and other tools on streaming data in real-time. Kinesis Data Analytics scales automatically to match your usage, there's no infrastructure to manage and you only pay for what you use.

Use-cases for Kinesis Data Analytics include:

  • Streaming extract, transform, and load (ETL) jobs
  • Real-time log analysis
  • Ad-tech and digital marketing analysis

Kinesis Data Analytics allows you to make use of existing and familiar SQL skills, it also integrates with other AWS services. You can deliver your results to any destination supported by Kinesis Data Streams or Kinesis Firehose, and use a Lambda function to deliver to external or un-managed destinations.

In this lab, you will learn how to use Kinesis Data Analytics to sessionize sample clickstream data and output it to DynamoDB using a Lambda.

Learning Objectives

This is a beginner-level lab, upon completion, you will be able to:

  • Use Amazon Kinesis Data Analytics to analyze clickstream data
  • Create an AWS Lambda function that adds records to an Amazon DynamoDB table
  • Configure Amazon Kinesis Data Analytics to send results to your AWS Lambda function

Intended Audience

  • Candidates for the AWS Certified Data Analytics Speciality exam
  • Data Engineers
  • Cloud Engineers


Familiarity with Data Analytics, SQL, the Bash shell, and the Python programming language will be beneficial but is not required.

The following courses can be used to fulfill the prerequisites:


September 7th, 2021 - Updated lab step instructions to reflect latest user interface changes 

March 11th, 2021 - Updated AWS Lambda lab step to reflect latest user interface changes

January 22nd, 2021 - Updated AWS Lambda lab step to reflect latest user interface changes

Environment before
Environment after
About the Author
Learning paths2

Andrew is a Labs Developer with previous experience in the Internet Service Provider, Audio Streaming, and CryptoCurrency industries. He has also been a DevOps Engineer and enjoys working with CI/CD and Kubernetes.

He holds the Developer - Associate, Sysops Administrator - Associate, and Solutions Architect – Associate AWS certifications.