- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Data

Using AWS Lambda With Amazon Kinesis Data Stream
In this lab, you will step into the shoes of a data engineer who is challenged with moving some taxi data from a Cloud9 instance to a DynamoDB table so the data analyst team can easily access and view it. To accomplish this, you will launch a CloudFormation stack, create a Kinesis Data Stream, create a DynamoDB table, format a Lambda function, and finally, move data from the Cloud9 instance to the DynamoDB table.

Lab Info
Table of Contents
-
Challenge
Create an Amazon Kinesis Data Stream
Create a Kinesis Data Stream named
input-stream
. -
Challenge
Populate Data on the Cloud9 Instance
- Add the
lab1.py
file from the lab GitHub repo to the Cloud9 instance. - Install boto3 on the instance using
pip install boto3
. - Run the newly created
lab.py
file withpython lab.py
.
- Add the
-
Challenge
Create a DynamoDB Table
Create a new DynamoDB table named
kinesisAggs
and add a partition key namedvendorId
with type of Number. -
Challenge
Create and Configure a Lambda Function
- Create a new Lambda function named
kinesisLambdaConsumer01
. - Set the IAM role to
KinesisLambdaConsumerRole-Kinesislab
- Download and modify the
lambda-deploy.zip
file from the lab GitHub repo.
- Create a new Lambda function named
-
Challenge
Confirm Data is Populating to DynamoDB
In the DynamoDB section of the console, explore items in the table and confirm that you have at least two entries.
(If you are not seeing data after 5 minutes, your python script may have timed out. If you do not see data flowing in the CLI, rerun the
python lab.py
command and data should start flowing through in about 3-5 minutes) -
Challenge
Create a CloudFormation Stack
Create a CloudFormation stack using the template file provided in the GitHub repo for this lab named
CFN Build.yaml
.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.