Is it possible to export data from DynamoDB table in some format?
The concrete use case is that I want to export data from my production dynamodb database and import
I extend Valy dia solution to allow all the process of exporting with only aws-cli | jq
aws dynamodb scan --max-items 3 --table-name \
| jq '{"": [.Items[] | {PutRequest: {Item: .}}]}' > data.json
aws dynamodb describe-table --table-name > describe.json | jq ' .Table | {"TableName": .TableName, "KeySchema": .KeySchema, "AttributeDefinitions": .AttributeDefinitions, "ProvisionedThroughput": {
"ReadCapacityUnits": 5,
"WriteCapacityUnits": 5
}}' > table-definition.json
aws dynamodb create-table --cli-input-json file://table-definition.json --endpoint-url http://localhost:8000 --region us-east-1
aws dynamodb batch-write-item --request-items file://data.json --endpoint-url http://localhost:8000
aws dynamodb scan --table-name --endpoint-url http://localhost:8000