### 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
return importlib.machinery.SourceFileLoader(name, file).load_module()
def exec_lambda_code(script, handler_function="handler", lambda_cwd=None, lambda_env=None):
    
    
    def _do_exec_lambda_code():
        if lambda_cwd or lambda_env:
            if lambda_cwd:
                previous_cwd = os.getcwd()
                os.chdir(lambda_cwd)
                sys.path = [lambda_cwd] + sys.path
            if lambda_env:
                previous_env = dict(os.environ)
                os.environ.update(lambda_env)
        
        lambda_id = "l_%s" % short_uid()
        lambda_file = LAMBDA_SCRIPT_PATTERN.replace("*", lambda_id)
        save_file(lambda_file, script)
        
        TMP_FILES.append(lambda_file)
        TMP_FILES.append("%sc" % lambda_file)
        try:
            pre_sys_modules_keys = set(sys.modules.keys())
            
            env_vars_before = lambda_executors.LambdaExecutorLocal.set_default_env_variables()
            try:
                handler_module = load_source(lambda_id, lambda_file)
                module_vars = handler_module.__dict__
            finally:
                lambda_executors.LambdaExecutorLocal.reset_default_env_variables(env_vars_before)