Amazon comprehend PII detection job: Error parsing parameter 'cli-input-json': Invalid JSON received.

0

I am trying to run a pii detection job using the command

aws comprehend start-pii-entities-detection-job \
    --region us-east-1 \
    --job-name pii_test\
    --cli-input-json input.json

But I get the error

Error parsing parameter 'cli-input-json': Invalid JSON received.

My json is formatted correctly as far as I can tell. Has anyone seen this before or know a fix? Thanks

  • Can you share your JSON? Does it parse correctly through a tool such as jq?

Charith
preguntada hace un año218 visualizaciones
1 Respuesta
1

The --cli-input-json option takes the actual JSON document as its value, not a filename. You need to use file://input.json, which will make the CLI read the value from the file.

(Had a brainwave a while after posting my initial comment above!)

profile pictureAWS
EXPERTO
James_S
respondido hace un año
  • Thanks that worked!

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas