How to create dynamo db stream event filter for a field from array of objects?

0

I want to create an event filter which should check, If status field for all the object inside the array is 'COMPLETED' then it should trigger the lambda.

example json

"parts": { "L": [ { "M": { "path": { "NULL": true }, "renditionGuid": { "S": "xyz" }, "status": { "S": "COMPLETED" } } }, { "M": { "path": { "NULL": true }, "renditionGuid": { "S": "xyz" }, "status": { "S": "COMPLETED" } } }

Is it possible to apply filter pattern like this?

gefragt vor 2 Jahren1101 Aufrufe
1 Antwort
0

Hi,

Thanks for reaching out. Regrettably, this is not possible at the moment. I have reviewed our documentation and also checked with our Lambda team but there's currently no method or operator which can iterate through the list/array and then check each element. The closest we were able to get to is matching any object of the list that has "Status" = "Success".

There is currently no way of forcing all objects in the array to match the pattern and there will be a need to filter it further from the Lambda function itself.

AWS
SUPPORT-TECHNIKER
Ryan_A
beantwortet vor 2 Jahren
  • Hi, I am having a similar scenario but instead of "status" I have "timeStamp", is there a way to pick the "timeStamp" attribute out of the array of objects and filter out items that are after a particular time

  • @ryan_A is this still valid? does it apply on eventbridge fitlers as well?

  • Hi, please let know if this is still the case or we can iterate/check all the objects of the list for the matching value.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen