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?

已提问 2 年前1101 查看次数
1 回答
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
支持工程师
Ryan_A
已回答 2 年前
  • 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.

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

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

回答问题的准则