what is wrong in this prefix comparator dynamodb stream fillter pattern?

0

Hi, I try to filter dynamodb stream events with the following pattern:

"MaximumRetryAttempts": 1,
        "FilterCriteria": {
          "Filters": [
            {
              "Pattern": "{\"eventName\":[\"INSERT\",\"MODIFY\",\"REMOVE\"],\"dynamodb\":{\"NewImage\":{\"PK\":{\"S\":[{\"prefix\":[\"BOOK\"]}]}}}}"
            }
          ]

However, Cloudformation throws an error saying it is invalid. I can not see the error here? What am I doing wrong?

Haiko
質問済み 2年前687ビュー
1回答
0

Answering my own question for someone who stumbles upon this. Apparently, for the prefix comparator, you do not need extra brackets. The following is correct:

 "Filters": [
            {
              "Pattern": "{\"eventName\":[\"INSERT\",\"MODIFY\",\"REMOVE\"],\"dynamodb\":{\"NewImage\":{\"PK\":{\"S\":{\"prefix\":[\"BOOK\"]}}}}}"
            }
          ]
Haiko
回答済み 2年前

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

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

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