I want to import json file into dynamoDB via AWS cli.
I have created a demo table music with partition key name.
I entered below command :
aws dynamodb put-item --table-name music --item file://0001.json --return-consumed-capacity TOTAL
I receive following error:
Parameter validation failed: Invalid type for parameter Item.Count, value: 503, type: , valid types: Invalid type for parameter Item.Items, value: [OrderedDict([('phoneNumber', OrderedDict([('S', 'GpDxxZRJIlUuoqlULj6h0w==')])),
below is my json file, is there anything wrong with the:
{
"Items": [
{
"phoneNumber": {
"S": "GpDxxZRJIlUuoqlULj6h0w=="
},
"isfisheye": {
"N": "0"
},
"isdeleted": {
"N": "0"
},
"contactFEId": {
"S": "FE160959275516"
},
"ismerged": {
"N": "0"
},
"source": {
"S": "fromPhone"
},
"secondaryPhoneNumbers": {
"L": [
{
"S": "n/a"
}
]
},
"email": {
"S": "XVRb5DlaaC8yIfujKnLsUkV+yv0Ry9nPeWN2iv9OQPY="
},
"name": {
"S": "Sankey Vaishali"
},
"isBlocked": {
"N": "0"
},
"contactId": {
"S": "1528891536"
},
"sharedData": {
"N": "2"
},
"secondaryEmails": {
"L": [
{
"S": "n/a"
}
]
},
"userId": {
"S": "FE1411544738781"
},
"privacyEnabled": {
"N": "1"
}
},
],
"ScannedCount": 503
}
I have a doubt that may be the json format might be wrong. Can anyone help to solve this as i'm new to aws.
filename.json? - shuvalov0001.jsoncontains json data. - Prathamesh Doke{ "ConsumedCapacity": { "TableName": "music", "CapacityUnits": 1.0 } }, but when i tried it with json file. it shows the same data in prettyprint format in the console. - Prathamesh Doke