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년 전1102회 조회
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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠