- Lab
- A Cloud Guru
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.
Path 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
.
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.