IssueRaiser

--cli-input-json error message very misleading

I am new to aws cli, and recently discovered the --cli-input-json parameters. I admit that I jumped in without fully read the document, but then, when I firstly specified a file name of my JSON document to the parameter (I guess lots programmers will do the same in the first attempt without reading the documentation), as follows: aws dynamodb create-table --cli-input-json awscli-jsons/dynamodb-create-table-contact.json The error message I received would be like: Error parsing parameter 'cli-input-json': Invalid JSON: No JSON object could be decoded JSON received: awscli-jsons/dynamodb-create-table-contact.json In every way the message seems like indicates the file format was wrong, not a valid JSON file, and cannot be parsed. I studied the documents from "aws dynamodb create-table help" and still was given no clue. Much time was spent until I find that I should issue the command as: aws dynamodb create-table --cli-input-json file://awscli-jsons/dynamodb-create-table-contact.json Firstly, such important information (using file://), which is different from the norm (in most cases we expect providing the file name), should be mentioned in the command help. Then, the error message is very misleading, points to a wrong direction. Please enhance this behavior. Thanks Bing

Posted by bingtimren on Aug 6, 2018, 5:07 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

github (Other)

--cli-input-json error message very misleading

bingtimrenAug 6, 2018, 5:07 AM

I am new to aws cli, and recently discovered the --cli-input-json parameters. I admit that I jumped in without fully read the document, but then, when I firstly specified a file name of my JSON document to the parameter (I guess lots programmers will do the same in the first attempt without reading the documentation), as follows: aws dynamodb create-table --cli-input-json awscli-jsons/dynamodb-create-table-contact.json The error message I received would be like: Error parsing parameter 'cli-input-json': Invalid JSON: No JSON object could be decoded JSON received: awscli-jsons/dynamodb-create-table-contact.json In every way the message seems like indicates the file format was wrong, not a valid JSON file, and cannot be parsed. I studied the documents from "aws dynamodb create-table help" and still was given no clue. Much time was spent until I find that I should issue the command as: aws dynamodb create-table --cli-input-json file://awscli-jsons/dynamodb-create-table-contact.json Firstly, such important information (using file://), which is different from the norm (in most cases we expect providing the file name), should be mentioned in the command help. Then, the error message is very misleading, points to a wrong direction. Please enhance this behavior. Thanks Bing

Comments (0)

No comments yet. Start the discussion.

Comment on this issue