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.
account_id = uri.split(':lambda:path')[1].split(':function:')[0].split(':')[-1]
                    data_str = json.dumps(data) if isinstance(data, dict) else data
                    relative_path, query_string_params = extract_query_string_params(path=relative_path)
                    source_ip = headers['X-Forwarded-For'].split(',')[-2]
                    
                    
                    request_context = {
                        'path': relative_path,
                        'accountId': account_id,
                        'resourceId': resource.get('id'),
                        'stage': stage,
                        'identity': {
                            'accountId': account_id,
                            'sourceIp': source_ip,
                            'userAgent': headers['User-Agent'],
                        }
                    }
                    try:
                        path_params = extract_path_params(path=relative_path, extracted_path=extracted_path)
                    except Exception:
                        path_params = {}
                    result = lambda_api.process_apigateway_invocation(func_arn, relative_path, data_str,
                        headers, path_params=path_params, query_string_params=query_string_params,
                        method=method, resource_path=path, request_context=request_context)
                    if isinstance(result, FlaskResponse):
                        return flask_to_requests_response(result)
                    response = Response()
                    parsed_result = result if isinstance(result, dict) else json.loads(result)
                    parsed_result = common.json_safe(parsed_result)
                    response.status_code = int(parsed_result.get('statusCode', 200))