I'm trying to run an AWS_PROXY integration between APIGateway and Lambda, and I'm hitting what looks like a fundamental logic bug in the APIGateway implementation.

https://github.com/localstack/localstack/blob/master/localstack/services/apigateway/apigateway_listener.py#L101

```
 File "/opt/code/localstack/localstack/services/apigateway/apigateway_listener.py", line 101, in forward_request
    'resourceId': resource.get('id'),
UnboundLocalError: local variable 'resource' referenced before assignment
```

Scanning up the file, it looks like `resource` is only be initialized within a `catch` block.  I assume this is a simple oversight rather than a complex bug.

This looks like a bug I can fix, but I'd appreciate any guidance you can offer.
from localstack.services.kinesis import kinesis_listener
from localstack.services.generic_proxy import ProxyListener
from .helpers import (get_rest_api_paths, get_resource_for_path,
                      flask_to_requests_response, handle_authorizers,
                      extract_query_string_params, extract_path_params,
                      make_error, get_cors_response)
LOGGER = logging.getLogger(__name__)
PATH_REGEX_AUTHORIZERS = r'^/restapis/([A-Za-z0-9_\-]+)/authorizers(\?.*)?'
class ProxyListenerApiGateway(ProxyListener):
    def forward_request(self, method, path, data, headers):
        data = data and json.loads(to_str(data))
        
        regex2 = r'^/restapis/([A-Za-z0-9_\-]+)/([A-Za-z0-9_\-]+)/%s/(.*)$' % PATH_USER_REQUEST
        if re.match(regex2, path):
            search_match = re.search(regex2, path)
            api_id = search_match.group(1)
            stage = search_match.group(2)
            relative_path = '/%s' % search_match.group(3)
            try:
                integration = aws_stack.get_apigateway_integration(api_id, method, path=relative_path)
                assert integration
            except Exception:
                try:
                    integration = aws_stack.get_apigateway_integration(api_id, 'ANY', path=relative_path)
                    assert integration
                except Exception:
                    
                    path_map = get_rest_api_paths(rest_api_id=api_id)
                    try:
                        extracted_path, resource = get_resource_for_path(path=relative_path, path_map=path_map)