Skip to content

Ark667/DynamoDb2MongoDb

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


DynamoDb2MongoDb

Simple .Net5 application for transfering DynamoDb table data to MongoDb collection.
Explore the docs »
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

This project was intended to make a fast data transfer from a bunch of DynamoDb tables to MongoDb collections. Provisioned DynamoDb tables became too expensive and decided to migrate to managed MongoDb service on K8s cluster. MongoDb also provide some desirable querying features not present on DynamoDb.

(back to top)

Built With

(back to top)

Getting Started

You can execute current release with Docker.

docker run --rm --network=host ghcr.io/ark667/dynamodb2mongodb:master copy `
    --dynamoaccesskey *** `
    --dynamosecretaccesskey *** `
    --dynamoregion [region] `
    --mongoconnectionstring "mongodb://[host]:[port]/[database]" `
    --dynamotable [tablename]

You can also clone the repo and build it yourself.

  1. Clone the repo

    git clone https://github.com/Ark667/DynamoDb2MongoDb.git
    
  2. Build application

    dotnet build DynamoDb2MongoDb.sln
    
  3. Execute help option

    .\DynamoDb2MongoDb.exe --help

(back to top)

Usage

Basic usage is pretty straightforrward. Just call copy verb with required keys and parameters.

.\DynamoDb2MongoDb.exe copy `
    --dynamoaccesskey *** `
    --dynamosecretaccesskey *** `
    --dynamoregion [region] `
    --mongoconnectionstring "mongodb://[host]:[port]/[database]" `
    --dynamotable [tablename]

Can also be executed from Docker container.

docker build -f ".\DynamoDb2MongoDb\Dockerfile" .
docker run --rm --network=host dynamodb2mongodb copy `
    --dynamoaccesskey *** `
    --dynamosecretaccesskey *** `
    --dynamoregion [region] `
    --mongoconnectionstring "mongodb://[host]:[port]/[database]" `
    --dynamotable [tablename]

If you need authentication. Specified database is used for database operations, not as authetication database as default mongodb behaviour on connection string.

docker run --rm --network=host dynamodb2mongodb copy 
    --dynamoaccesskey *** 
    --dynamosecretaccesskey *** 
    --dynamoregion [region] 
    --mongoconnectionstring "mongodb://[user]:[password]@[host]:[port]/[database]" 
    --dynamotable [tablename]

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Feel free to use the code in this repository as it is under MIT license. See LICENSE.txt for more information.

ko-fi

(back to top)

Contact

Aingeru Medrano - @AingeruBlack

Project Link: https://github.com/Ark667/DynamoDb2MongoDb

(back to top)

About

Simple .Net application for transfering DynamoDb table data to MongoDb collection.

Topics

Resources

License

Stars

Watchers

Forks

Packages