Import CSV downloaded from dynamodb to your local dynamodb
This project is built so you can import data downloaded as CSV from AWS dynamodb to your local copy of dynamodb.
Before running
Change the config.json to match your environment
Create new table matching the sample.csv
format or any table you want to import the csv file into
aws dynamodb --endpoint-url http://localhost:8000 create-table \--attribute-definitions AttributeName=email,AttributeType=S AttributeName=fullName,AttributeType=S \--table-name sample \--key-schema AttributeName=email,KeyType=HASH AttributeName=fullName,KeyType=RANGE \--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
Running from within the cloned directory
Install the dependencies
npm i
Link the bin directory
npm link
Then run the actual command
import-csv-to-dynamo -t <table_name> <path-to-csv>
Verify
aws dynamodb --endpoint-url http://localhost:8000 scan --table-name sample