I've taken a backup of a DynamoDB table in the AWS Console. I was able to download the file locally. I'd like to take that file and import it into a local dynamodb instance for testing. I've got far enough to create the table, however the backup json format doesn't seem to match nicely to the .NET AWS SDK APIs (thats a lot of TLAs).
Example backup contents:
{"Item":{"Attributes":{"M":{"createdAt":{"N":"1611923095468"},"eventDate":{"S":"2021-01-30T17:00:00.000Z"} }},"PartitionKey":{"S":"1234"},"SortKey":{"S":"1"}}}
{"Item":{"Attributes":{"M":{"createdAt":{"N":"1611923095468"},"eventDate":{"S":"2021-01-30T17:00:00.000Z"} }},"PartitionKey":{"S":"1234"},"SortKey":{"S":"2"}}}
The .NET APIs seem to want to convert the JSON in the non-dynamodb attribute format, so expect it like this:
{
"Item": {
"Attributes": {
"createdAt": "1611923095468",
"eventDate": "2021-01-30T17:00:00.000Z"
},
"PartitionKey": "1234",
"SortKey": "1"
}
}
So, I'd like to do something like:
var json = "{}"; // ORIGINAL CONCATENATED JSON FROM ABOVE
Document.FromJson(json)
Is there some API that I'm missing that can convert this into some format that I can load into dynamodb? Again, using .NET, but open to any tools/utils for this.