https://github.com/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.
https://github.com/ct83/dynamodb-python-docker-compose-starter-kit
aws aws-dynamodb docker docker-compose docker-compose-template dynamodb python python3 starter-kit starter-template
Last synced: 6 months ago
JSON representation
An AWS DynamoDB with Python using Docker and Docker Compose Starter kit to help you hit the ground running.
- Host: GitHub
- URL: https://github.com/ct83/dynamodb-python-docker-compose-starter-kit
- Owner: CT83
- License: apache-2.0
- Created: 2019-10-28T14:49:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T21:51:28.000Z (over 1 year ago)
- Last Synced: 2025-01-03T02:34:34.012Z (6 months ago)
- Topics: aws, aws-dynamodb, docker, docker-compose, docker-compose-template, dynamodb, python, python3, starter-kit, starter-template
- Language: Shell
- Homepage:
- Size: 1.47 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# 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](https://aws.amazon.com/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?
1. The `app.py` uses Facebook's Hydra Config Management to pickup the desired configuration, from the .yml file and
loads it.
2. Then a connection is made to a DynamoDB Instance.
3. Some basic database operations are performed using the [PynamoDB](https://pynamodb.readthedocs.io/en/latest/) 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](https://hub.docker.com/r/amazon/dynamodb-local/).
All the database operations are then performed on this local instance.1. `docker-compose up --build`
### 2. AWS DynamoDB Mode
Here, the `app.py` will connect to the [AWS DynamoDB](https://aws.amazon.com/dynamodb/) Instance, this is how your code might run in the production.
In this mode you are expected to
1. [Create a Python Virtual Environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)
2. `pip install -r requirements.txt`
3. Create an `.env` file with your AWS Credentials, like `example.env`.
4. Replace *docker* with *aws* in the `env-config.yml`.
3. Run using `python app.py`