Building a Python Client for Amazon DynamoDB
Description
In this lab, you will gain hands-on experience developing and testing a Python application that uses the AWS SDK for Python (Boto3) to interact with an Amazon DynamoDB database table.
Beyond just interacting with the database, you will also gain experience in the fuller development experience by using the AWS Command Line Interface (AWS CLI) to verify the result of running your application, which will insert data into the database, fetch the data, and query for it using two different query types.
Note: This is an intermediate level lab. Most of the coding tasks will provide parts of the solution, but will require the student to work through the implementation. However, a solution file is provided if the student gets stuck.
Learning objectives
Upon completion of this intermediate level lab, you will be able to:
- Use the AWS CLI to verify the DynamoDB database table exists
- Create Python client and resource objects for interacting with DynamoDB
- Put data into the DynamoDB table using the Python Boto3 library
- Query the DynamoDB table using the Python Boto3 library
- Query the DynamoDB table using the AWS CLI as a way to verify the results
Intended audience
- Candidates for the AWS Certified Developer Associate certification
- Cloud Developers
- Data Engineers
Prerequisites
To get the most out of this lab, you should be familiar with the following:
- Python
- DynamoDB
Familiarity with the following will be beneficial but is not required:
- AWS SDK for Python (Boto3)
- AWS Command Line Interface (AWS CLI)
The following content can be used to fulfill the prerequisites: