import-csv-to-dynamo-db

1.0.2 • Public • Published

Import CSV downloaded from dynamodb to your local dynamodb

Build status Coverage Status

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

{
  "region": "ap-southeast-1",
  "endpoint": "http://127.0.0.1:8000"
}

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

Package Sidebar

Install

npm i import-csv-to-dynamo-db

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

7.28 kB

Total Files

15

Last publish

Collaborators

  • limbuster