2017-02-13 6 views
-1
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}}', : 

Antwort

1

Sie müssen alle Leerzeichen im JSON-Teil des Befehls entfernen oder ausschließen. Dies ist ein häufiges Problem, weshalb die meisten Beispiele in den aws dynamodb CLI tool docs die Verwendung einer JSON-Datei zeigt, statt wie so:

aws dynamodb put-item --table-name weatherstation_data --item file://item.json --profile loadmin 
0

Nevermind seine Fenster CMD, das ist das Problem gibt unter Linux die gleiche lief es gibt die Ausgabe zurück

aws dynamodb put-item --Tabellenname weatherstation_data --item '{"station_id": {"S": "000001"}, "dateandtime": {"S": "2015/12/25 00:00 "}," temperature ": {" N ":" 0 "}} '--profile loadmin

Verwandte Themen