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
asked a year ago218 views
1 Answer
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
EXPERT
James_S
answered a year ago
  • Thanks that worked!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions