1. Learn
  2. /
  3. Courses
  4. /
  5. Streaming Data with AWS Kinesis and Lambda

Connected

Exercise

Time-triggered lambda code

Cody wants to be able to pull a full report of all speeders, forever, for all time - and she wants it updated nightly.

She asked you to create a nightly job

The current structure looks like this: TfQB4.png

Write the code that would go into the lambda_handler method of the function you created in the last exercise.

All boto3, pandas and awsrangler have been imported for you, and the keys have been defined.

Let's roll!

Instructions

100 XP
  • Initialize the boto3 session with AWS_KEY_ID and AWS_SECRET.
  • Pass the session to the AWS Wrangler read_csv method to get all the speeder dataframes.
  • Use AWS Wrangler to write the resulting csv with the key "sd-vehicle-data/speeders-full/full.csv".