A utility to import CSV files generated by the AWS DynamoDB Console Export to csv
feature into a DynamoDB table.
# Set the region to use
export AWS_DEFAULT_REGION=us-east-1
# Run without installing globally
npx @gorillastack/dynamodb-csv-export-import my-exported-file.csv MySlackTable
# OR
# Install globally
npm i -g @gorillastack/dynamodb-csv-export-import
export AWS_DEFAULT_REGION=us-east-1
dynamodb-csv-export-import my-exported-file.csv MySlackTable
The following environment variables affect its runtime:
- DYNAMODB_ENDPOINT_URL - change the DynamoDB endpoint (useful when running dynamodb-local)
- AWS_DEFAULT_REGION - set the region it connects to (defaults to us-east-1)
This utility was created specifically to deal with the CSV files generated by the AWS Console which have a particular export format (column names and type in the first row, mixed JSON / values in each record).
It does not have the ability to export from DynamoDB to CSV or import from arbitrary CSV files to DynamoDB.
Copyright (C) 2020 GorillaStack. Licensed under the Apache 2.0 License.