By using AWS re:Post, you agree to the Terms of Use

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?

1 Answer
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.

SUPPORT ENGINEER
answered 4 months ago
  • 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions