Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CLI: Error parsing parameter '--item': Expected: '=', received: '"' for input:

I am trying to simply insert one item using json as input file. I am running command on Windows Cmd prompt:

aws2 dynamodb put-item --table-name testCLI --item file://C:\Temp\DynamoDB\item.json

table testCLI has 2 attributes - ID and Value

File item.json:

"{\"ID\": {\"N\":\"2\"}, \"Value\": {\"S\": \"From json file with escape characters\"}}"

I am getting error:

Error parsing parameter '--item': Expected: '=', received: '"' for input: "{\"ID\": {\"N\":\"2\"}, \"Value\": {\"S\": \"From json file with escape characters\"}}"

aws2 --version

aws-cli/2.0.0dev3 Python/3.7.5 Windows/10 botocore/2.0.0dev2
like image 558
user1484777 Avatar asked Dec 17 '22 14:12

user1484777


1 Answers

If you are using Windows, you can use escape sequence as in the following command to successfully run in AWS CLI as below:

aws textract detect-document-text --document "{\"S3Object\":{\"Bucket\":\"NameOfBucket\",\"Name\":\"NameOfImage\"}}"
like image 55
Krishty Avatar answered Apr 12 '23 23:04

Krishty