This project is a command-line interface (CLI) tool for interacting with AWS DynamoDB. It allows users to import, export, and reset data in DynamoDB tables.
- Import data from a specified file into a DynamoDB table.
- Export data from a DynamoDB table to a specified file.
- Reset a DynamoDB table, clearing all its data.
- Python 3.x
- AWS credentials configured in your environment.
-
Clone the repository:
git clone <repository-url> cd dynamodb-cli-tool
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your AWS credentials:
- Create a
.env
file in the root directory and specify yourAWS_PROFILE
:AWS_PROFILE=your_aws_profile
- Create a
To use the CLI tool, run the following command:
python src/main.py <command> --table <table_name> --file <file_path>
-
import: Import data into the specified DynamoDB table.
python src/main.py import --table <table_name> --file <file_path>
-
export: Export data from the specified DynamoDB table.
python src/main.py export --table <table_name> --file <file_path>
-
reset: Reset the specified DynamoDB table.
python src/main.py reset --table <table_name>
To import data from a file named data.json
into a table called MyTable
, use the following command:
python src/main.py import --table MyTable --file data.json
This project is licensed under the MIT License.