Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

676
Vistas
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
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

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\"}}"
over 4 years ago · Santiago Trujillo Denunciar

0

That error is being caused by the quotes at the beginning and end of the JSON file.

However, removing them also seems to cause a problem due to the backslashes.

It worked for me (on a Mac, not Windows) when I used this file:

{"ID": {"N":"2"}, "Value": {"S": "From json file with escape characters"}}
over 4 years ago · Santiago Trujillo Denunciar

0

Was trying out AWS DynamoDB samples from Windows CMD prompt... I spent more time figuring out the command, escape characters, quotes, .... than the time i spent on learnign DynamoDB itself. Phew!

Just adding the below if it might help anyone, and myself if i end up googling/sfo'ing again!!

Command for Linux Shell

aws dynamodb put-item \
--table-name device_data \
--item \
'{"device_id": {"S": "12345678"}, "datacount": {"N": "1"} , "timestamp": {"N": "1514876999940"}, "temperature1": {"N": "32.78"}, "temperature2": {"N": "21.76"}, "temperature3": {"N": "15.12"}, "temperature4": {"N": "20.22"}, "temperature5": {"N": "14.43"} }'

Command that worked for me in Windows Command Prompt

aws dynamodb put-item ^
--table-name device_data ^
--item ^
"{\"device_id\": {\"S\": \"12345678\"}, \"datacount\": {\"N\": \"1\"} , \"timestamp\": {\"N\": \"1514876999940\"}, \"temperature1\": {\"N\": \"32.78\"}, \"temperature2\": {\"N\": \"21.76\"}, \"temperature3\": {\"N\": \"15.12\"}, \"temperature4\": {\"N\": \"20.22\"}, \"temperature5\": {\"N\": \"14.43\"} }"
  1. Replaced Back Slash \ with Carot ^ --> this is only for breaking the command to next line. No space after Carot ^
  2. Replaced Single qoute ' with Double Quote " around the whole JSON
  3. Added Back Slash \ as Escape Char before the Double Quote " inside JSON
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda