### Is there an existing issue for this?

- [X] I have searched the existing issues

### Feature description

Basically we want to only run the lambda when an insert is occurring in DynamoDB.
I tested using Dynobase deleting a record and the lambda still triggered.

```
resource "aws_lambda_event_source_mapping" "event-log" {
	event_source_arn  = aws_dynamodb_table.event-log.stream_arn
	function_name     = module.main.lambda-arn
	starting_position = "LATEST"
	enabled = true # change to false when truncating the table in localstack
	maximum_retry_attempts = 1 # limit retry on failure to 1 for now

	# https://dev.to/aws-builders/filtering-dynamodb-streams-before-lambda-p5p
	filter_criteria { # Doesn't seem to work on LocalStack for now
		filter {
			pattern = jsonencode({
				body = {
					eventName : ["INSERT"]
				}
			})
		}
	}
}
```


### 🧑‍💻 Implementation

_No response_

### Anything else?

 https://dev.to/aws-builders/filtering-dynamodb-streams-before-lambda-p5p
result = sqs_client.receive_message(QueueUrl=queue_event_source_mapping)
                msg = result["Messages"][0]
                body = json.loads(msg["Body"])
                assert body["requestContext"]["condition"] == "RetryAttemptsExhausted"
                assert body["KinesisBatchInfo"]["batchSize"] == 1
                assert body["KinesisBatchInfo"]["streamArn"] == kinesis_arn
            retry(verify_failure_received, retries=50, sleep=5, sleep_before=5)
        finally:
            kinesis_client.delete_stream(StreamName=kinesis_name, EnforceConsumerDeletion=True)
            lambda_client.delete_event_source_mapping(UUID=event_source_mapping_uuid)
def _await_event_source_mapping_enabled(lambda_client, uuid, retries=30):
    def assert_mapping_enabled():
        assert lambda_client.get_event_source_mapping(UUID=uuid)["State"] == "Enabled"
    retry(assert_mapping_enabled, sleep_before=2, retries=retries)
def _await_dynamodb_table_active(dynamodb_client, table_name, retries=6):
    def assert_table_active():
        assert (
            dynamodb_client.describe_table(TableName=table_name)["Table"]["TableStatus"] == "ACTIVE"
        )
    retry(assert_table_active, retries=retries, sleep_before=2)
def _get_lambda_invocation_events(logs_client, function_name, expected_num_events, retries=30):
    def get_events():
        events = get_lambda_log_events(function_name, logs_client=logs_client)
        assert len(events) == expected_num_events
        return events
    return retry(get_events, retries=retries, sleep_before=2)