Gilo
Gilo

Reputation: 720

trigger AWS lambda function from SQS that already has messages in it

If I set a trigger for lambda function from SQS that already has messages in it, will the existing messages trigger the lambda function? or that only new arriving messages will trigger it? If the old messages won't trigger the lambda function automatically, is there a manual way that will still trigger the lambda function to read the old messages?

Edit: After testing that, the answer is YES. The existing messages do trigger the lambda function.

Upvotes: 0

Views: 567

Answers (2)

AcAnanth
AcAnanth

Reputation: 775

When the trigger is set up, the lambda function not only gets activated by new messages but also gets caught up on the backlog in the queue.

Upvotes: 0

Gilo
Gilo

Reputation: 720

After testing that, the answer is YES. The existing messages do trigger the lambda function.

Upvotes: 1

Related Questions