
With Python, you have the possibility to create a virtual environment, so that packages are installed into a folder within your project directory, instead of the system. Instructions Creating a Python virtual environment This is a very simple view, and in a more advanced example, you might want to also sort the courses, that have been last used, but we will not go into these details in this tutorial. This way we can use the user-id, to get and display all the courses, that the user subscribed to. Description: A description of the course.The DynamoDB table layout looks the following:Īs we want to list all the courses, that the user subscribed to, our Partition Key (PK) will be the user id, and the sort key (SK), will be the course id.

If the user logs into the application, we want to display the courses he subscribed to. Once the user subscribed to some courses, they will be stored in the “CourseSubscriptions” table. Think about an application with which a user can subscribe to courses. The table we create will be called “CourseSubscriptions”. In this tutorial, we will write a command-line Python script, with which we can connect to the local DynamoDB instance, create the DynamoDB table, write some test data into it, list the test data, and delete the table again.
List tables on local dynamodb how to#
This tutorial is written for macOS, but if you use another operating system, you should be able to follow along and find out, how to execute the command-line commands on your operating system.

How to create a table in the local DynamoDB database using Python?Ĭreate a Python script, which you can execute over the command line, to create the table, add some data, and delete the table.įollowing steps need to be taken, before following this manual: If not, then please follow the sequence in the pre-requisites section. If you have been following the sequence of the tutorial, then you have already created an AWS SAM CLI Python application.
