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
質問済み 1年前217ビュー
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
回答済み 1年前
  • Thanks that worked!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ