5
votes

I have configured a lambda function to take DynamoDb Stream as trigger. It seems to pick up all events on the DynamoDb

Is there any options to invoke Lambda only on certain type of event ( DynamoDB item delete ) so that Lambda function will not be fired on every action?

The goal is to save the cost of invoking lambda function for events that I dont need.

2

2 Answers

11
votes

There is no such options as far as I know. DynamoDB updates its stream data whenever any item is created, modified and deleted. Any change in the stream invokes the lambda function. You can check for "eventName" value as "REMOVE" in the event from dynamodb and only process that event.

-1
votes

In your Lamda settings in AWS console you can specify which event should trigger it while configuring the trigger.