- Lab
- A Cloud Guru
Implementing a Simple DynamoDB Application
In this lab, we will implement a simple application that accepts CSV files, converts them to DynamoDB JSON, and puts the data into a table with the same name as the file. In the solution video, we will walk through how to reach these goals with the Python Boto3 SDK.
Path Info
Table of Contents
-
Challenge
Write Application Code
Write code utilizing the AWS SDK for the language of your choice to convert the CSV file with the field delimiter of
Ԙ
and quotation character ofԡ
to the DynamoDB JSON format as seen below. Also include table creation for tables that share the name of the provided files without the file extension, and write the converted files to the appropriate tables.Data Conversion Sample
So this:
"ԡ12ԡԘԡGiant Sandԡ"
Becomes:
{ 'id': { 'N': '12' }, 'name': { 'S': 'Giant Sand' } },
Hint: The code can be found on GitHub.
-
Challenge
Log In to the Provided EC2 Instance and Run the Code
- Log in to the provided EC2 instance using the provided IP address and credentials.
- Write your code to a file named
pinehead_data_util
and configure to be able to run as a command. - Run your code!
-
Challenge
Verify the Data Migration to AWS
- Log in to the AWS Management Console for the lab account with the provided credentials.
- Navigate to DynamoDB.
- Verify there are three tables and the appropriate data loaded correctly.
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.