In my usecase I want to trigger an aws-lambda function if sqs payload message contain a specific attribute. For example following is an sqs payload
{
"attribute1" : "test1",
"attribure2" : "test2"
}
if sqs payload contains attribute named "attribure1" and its value is equal to "test1" , I want to trigger a lambda function named testLambda.
Can we create such rules with AWS event-bridge service(https://aws.amazon.com/eventbridge/)?
SQS trigger do not work on data inside the message, rather on the submission of the message into the queue.
I would suggest a routing lambda sitting between your lambda with business logic and SQS. This routing Lambda will consume messages from SQS and route them to the required business logic lambdas. Here you can look at how triggers work and their use cases.