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
demandé il y a 2 ans687 vues
1 réponse
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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions