A Docker and Docker Compose starter kit to help you get started with AWS DynamoDB quickly.
Use this as a boilerplate for your next project, I already did!
CT83 / DynamoDB-Python-Docker-Compose-Starter-Kit
An AWS DynamoDB with Python using Docker and Docker Compose Starter kit to help you hit the ground running.
DynamoDB-Python-Docker-Compose-Starter-Kit
A Docker and Docker Compose starter kit to help you get started with AWS DynamoDB quickly.
Use this as a boilerplate for your next project, I already did!
I am assuming you are already familiar with Docker and Docker Compose, so I'll get right to it.
What is DynamoDB?
Amazon DynamoDB is a fully managed proprietary NoSQL database service that supports key-value and document data structures.
What does the app.py
do?
- The
app.py
uses Facebook's Hydra Config Management to pickup the desired configuration, from the .yml file and loads it. - Then a connection is made to a DynamoDB Instance.
- Some basic database operations are performed using the PynamoDB library.
How to run?
There are 2 modes in which you can run the app.py
in.
1. Local DynamoDB Mode -
Here, A Local Instance of DynamoDB is spun up using, Docker and Amazon's Official Local DynamoDB Image.
Allβ¦
I am assuming you are already familiar with Docker and Docker Compose, so I'll get right to it.
What is DynamoDB?
Amazon DynamoDB is a fully managed proprietary NoSQL database service that supports key-value and document data
structures.
What does the app.py
do?
- The
app.py
uses Facebook's Hydra Config Management to pickup the desired configuration, from the .yml file and loads it. - Then a connection is made to a DynamoDB Instance.
- Some basic database operations are performed using the PynamoDB library.
How to run?
There are 2 modes in which you can run the app.py
in.
1. Local DynamoDB Mode -
Here, A Local Instance of DynamoDB is spun up using, Docker and Amazon's Official Local DynamoDB Image.
All the database operations are then performed on this local instance.
docker-compose up --build
2. AWS DynamoDB Mode
Here, the app.py
will connect to the AWS DynamoDB Instance, this is how your code might run in the production.
In this mode you are expected to
- Create a Python Virtual Environment
pip install -r requirements.txt
- Create an
.env
file with your AWS Credentials, likeexample.env
. - Replace docker with aws in the
env-config.yml
. - Run using
python app.py
That is it!
This should help you get started really quickly!
Top comments (0)