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.
}
    iam_client.create_policy(PolicyName=POLICY_NAME_PATTERN % function,
        PolicyDocument=json.dumps(policy), Description='Policy for Lambda function "%s"' % function)
    result = {'Statement': sid}
    return jsonify(result)
@app.route('%s/functions/<function>/policy/<statement>' % PATH_ROOT, methods=['DELETE'])
def remove_permission(function, statement):
    qualifier = request.args.get('Qualifier')
    iam_client = aws_stack.connect_to_service('iam')
    policy = get_lambda_policy(function)
    if not policy:
        return error_response('Unable to find policy for Lambda function "%s"' % function,
            404, error_type='ResourceNotFoundException')
    iam_client.delete_policy(PolicyArn=policy['PolicyArn'])
    result = {
        'FunctionName': function,
        'Qualifier': qualifier,
        'StatementId': policy['Statement'][0]['Sid'],
    }
    return jsonify(result)
@app.route('%s/functions/<function>/policy' % PATH_ROOT, methods=['GET'])
def get_policy(function):
    policy = get_lambda_policy(function)
    if not policy:
        return error_response('The resource you requested does not exist.',
            404, error_type='ResourceNotFoundException')
    return jsonify({'Policy': json.dumps(policy), 'RevisionId': 'test1234'})
@app.route('%s/functions/<function>/invocations' % PATH_ROOT, methods=['POST'])
def invoke_function(function):
    """ Invoke an existing function