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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则