When you create a Lambda permission you send the __statement id__ as mandatory parameter.

https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html#API_AddPermission_RequestSyntax

However this id is generated by a random value. 

https://github.com/localstack/localstack/blob/b3917bf248b77ced8ef80a3d5c0561960066db5d/localstack/services/awslambda/lambda_api.py#L927

Due to this problem, the tools like Terraform or Ansible fail when it has to be retrieved to check the existence of this element.

If you agree I could make a PR with the fix and its test.
""" List event source mappings
        ---
        operationId: 'listEventSourceMappings'
    """
    event_source_arn = request.args.get('EventSourceArn')
    function_name = request.args.get('FunctionName')
    mappings = event_source_mappings
    if event_source_arn:
        mappings = [m for m in mappings if event_source_arn == m.get('EventSourceArn')]
    if function_name:
        function_arn = func_arn(function_name)
        mappings = [m for m in mappings if function_arn == m.get('FunctionArn')]
    response = {
        'EventSourceMappings': mappings
    }
    return jsonify(response)
@app.route('%s/event-source-mappings/<mapping_uuid>' % PATH_ROOT, methods=['GET'])
def get_event_source_mapping(mapping_uuid):