May be a duplicate of https://github.com/localstack/localstack/issues/988 but due to the age I will re raise.

I'm having issues when I throw an exception in a lambda - it isn't appearing on my dead letter queue. Is there something I am missing, I would like an sqs event exception to appear on the poison queue when an exception happens.

Below is the basic config:
 ````
    sqsclient.create_queue(QueueName = 'test-queue')
    sqsclient.create_queue(QueueName = 'test-queue-poison')

    lambda_client.create_function(
            FunctionName='MyFunction',
            Runtime='dotnetcore2.1',
            Role='role',
            Handler='Handler',
            Code=code,
	    DeadLetterConfig={'TargetArn': 'test-queue-poison-arn'})

     lambda_client.create_event_source_mapping(
		EventSourceArn='test-queue-arn',
		FunctionName='MyFunction',
		Enabled=True,
		BatchSize=100,
		StartingPosition='LATEST')
````

So when I raise a new (.net)exception within the lambda function no message is going to the dead letter queue. I can confirm that all is attached together OK as all other scenarios work, and the above code is pseudo-ish.
}
        }
    raw_event_messages = []
    for record in event['Records']:
        
        
        ddb_new_image = deserialize_event(record)
        if MSG_BODY_RAISE_ERROR_FLAG in ddb_new_image.get('data', {}):
            raise Exception('Test exception (this is intentional)')
        
        kinesis_record = {
            'PartitionKey': 'key123',
            'Data': json.dumps(ddb_new_image)
        }
        if MSG_BODY_MESSAGE_TARGET in ddb_new_image.get('data', {}):
            forwarding_target = ddb_new_image['data'][MSG_BODY_MESSAGE_TARGET]
            target_name = forwarding_target.split(':')[-1]
            if forwarding_target.startswith('kinesis:'):
                ddb_new_image['data'][MSG_BODY_MESSAGE_TARGET] = 's3:/test_chain_result'
                kinesis_record['Data'] = json.dumps(ddb_new_image['data'])
                forward_event_to_target_stream(kinesis_record, target_name)
            elif forwarding_target.startswith('s3:'):
                s3_client = aws_stack.connect_to_service('s3')
                test_data = to_bytes(json.dumps({'test_data': ddb_new_image['data']['test_data']}))
                s3_client.upload_fileobj(BytesIO(test_data), TEST_BUCKET_NAME, target_name)
        else:
            raw_event_messages.append(kinesis_record)
    
    forward_events(raw_event_messages)
def deserialize_event(event):