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
posta 2 anni fa687 visualizzazioni
1 Risposta
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande