Reputation: 43
C:\Users\abhij\.aws\model>aws dynamodb put-item --table-name weatherstation_data --item '{"station_id":{"S":"000001"},"dateandtime" : {"S": "2015/12/25 00:00"},"temperature": {"N" : "0"}}' --profile loadmin
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: {S:, 2015/12/25 00:00},temperature:, {N, :, 0}}', :
Upvotes: 0
Views: 1220
Reputation: 43
Nevermind its the windows CMD thats giving the problem ran the same in linux it gives back the output
aws dynamodb put-item --table-name weatherstation_data --item '{"station_id":{"S":"000001"},"dateandtime" : {"S": "2015/12/25 00:00"},"temperature": {"N" : "0"}}' --profile loadmin
Upvotes: 2
Reputation: 201048
You need to remove or escape all the whitespace in the JSON portion of the command. This is a common problem, which is why most of the examples in the aws dynamodb CLI tool docs show the use of a JSON file instead, like so:
aws dynamodb put-item --table-name weatherstation_data --item file://item.json --profile loadmin
Upvotes: 1