My goal is to have simple tool for export dynamodb to local file(json/csv) only with aws cli or less 3th party as it's possible. The size of my tables are around 500mb.
I'm doing the research for few days now and I saw very nice projects like dynamodump and another SDK implementations. Also I test the Datapipeline from Amazon, but for task that I'm targeting want simple aws cli.
Let's say that I already have map for the table such as indexs and attributes.Now I want to import just the Items that I have. For me the best solution for the implementation that I have will be something like this:
Exporting the table from aws to local file:
aws dynamodb scan --table-name SOMETABLENAME --output json | jq '.Items[]' > SOMETABLENAME.jsonRendering the file with things like
sed,jq,awk...etc. To get proper json format whom can be imported to aws-dynamodbImport the Items from SOMETABLENAME to aws-dynamodb with:
aws dynamodb put-item --table-name SOMETABLENAME --item file://SOMETABLENAME.json
aws dynamodb scan) as well as for imports, usingaws dynamodb put-item. Are you just looking for confirmation? - Mike Dinescu