| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This project allows you to synchronize your production DynamoDB data to a local DynamoDB instance. This enables safe local development without the risk of accidentally modifying or deleting production data ("dropping the database and running away").
1. Install Docker DesktopPlease refer to the official documentation for installation instructions:
2. Install & Configure AWS CLIPlease refer to the official documentation:
If you don't have your access keys (or lost them), you need to generate new ones:
After installation, configure your credentials:
aws configureYou will be prompted for:
Copy the example configuration file and fill in your details:
cp .env.example .envEdit .env and set:
Since your account requires MFA, you must obtain a session token before running the sync script.
Run the auth script using source so it can export variables to your current shell:
# You will be prompted for your 6-digit MFA code
source ./aws-env.sh
# Or provide the code as an argument
source ./aws-env.sh 123456Why do I need to enter the code every time? MFA tokens are temporary credentials (valid for a short session). For security reasons, they expire quickly, requiring you to re-authenticate with a new code for each new session. You can also manually clear credentials by running: source ./aws-env.sh unauth
Start the local DynamoDB container using Docker Compose:
docker compose up -dRun the sync script (it will load tables and region from .env):
# Source the script to run it
# This ensures it can automatically clear your shell's AWS credentials after running
source ./sync-dynamodb.shNote: The script will automatically unset the high-privilege AWS credentials from your current terminal session after finishing to prevent accidental operations on production.
Arguments (optional if .env is set):
dynamodb-admin provides a GUI to view and manage your local DynamoDB tables.
Installation (requires Node.js):
npm install -g dynamodb-adminStart the Admin Tool: Since we mapped our local DynamoDB to port 4567, start it with:
dynamodb-admin --dynamo-endpoint=http://localhost:4567Access the GUI: Open your browser and visit: http://localhost:8001
| Back | FazBrowse Home | New Git URL |