I am trying to run the following command
aws dynamodb put-item \
--table-name TABLENAME \
--item file://accounts.json \
--profile ACCOUNTID \
--region us-east-1
TABLENAME and ACCOUNTID aren't variables. Just scrubbing their actual names.
The json file looks like this
[
{
"accountid": {"N": "ACCOUNTID"},
"accountname": {"S": "ACCOUNTNAME"}
},
{
"accountid": {"N": "ACCOUNTID"},
"accountname": {"S": "ACCOUNTNAME"}
}
]
Account info is also scrubbed for this example
And I keep getting
Error parsing parameter '--item': Invalid JSON:
I've checked the JSON on various validators and it's showing it's correct.
I also have used the following json file
{
"accountid": {"N": "090697449863"},
"accountname": {"S": "awc-n-sf-devops"}
}
To put one item in the table and it works fine.
What am I missing in the json file putting 2 items, that causing the error?
Thanks in advance.
