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
질문됨 일 년 전218회 조회
1개 답변
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
전문가
James_S
답변함 일 년 전
  • Thanks that worked!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠