# Type of request: 
This is a ...

[ x] bug report
[] feature request

# Detailed explaination

Currently when requesting a lambda through an API Gateway with the integration `AWS_PROXY` to a lambda, the request looks as so once it reaches the lambda:
```
{
  "resource": "/restapis/spxxrfc5pp/local/_user_request_/path/1",
  "path": "/path/1",
  "pathParameters": {
    "parameter "1"
  },
  "stageVariables": {
    "stage": "local"
  },
....
```
This is the wrong behaviour as AWS would return:

```
{
  "resource": "/path/{parameter}",
  "path": "/path/1",
  "pathParameters": {
    "parameter": "1"
  },
  "stageVariables": {
    "stage": "local"
  },
...
```
I think have found the offending line of code
https://github.com/localstack/localstack/blob/a9cefcc7cec6b3b079c701e420fcb61f891b9384/localstack/services/apigateway/apigateway_listener.py#L330

This should be `resource_path=resource_path`

Related to #3524


integration_type = integration.get('type') or integration.get('integrationType')
    uri = integration.get('uri') or integration.get('integrationUri')
    if (uri.startswith('arn:aws:apigateway:') and ':lambda:path' in uri) or uri.startswith('arn:aws:lambda'):
        if integration_type in ['AWS', 'AWS_PROXY']:
            func_arn = uri
            if ':lambda:path' in uri:
                func_arn = uri.split(':lambda:path')[1].split('functions/')[1].split('/invocations')[0]
            data_str = json.dumps(data) if isinstance(data, (dict, list)) else to_str(data)
            try:
                path_params = extract_path_params(path=relative_path, extracted_path=resource_path)
            except Exception:
                path_params = {}
            
            data_str = apply_template(integration, 'request', data_str, path_params=path_params,
                query_params=query_string_params, headers=headers)
            
            
            request_context = get_lambda_event_request_context(method, path, data, headers,
                integration_uri=uri, resource_id=resource_id)
            stage_variables = get_stage_variables(api_id, stage)
            result = lambda_api.process_apigateway_invocation(func_arn, relative_path, data_str,
                stage, api_id, headers, path_params=path_params, query_string_params=query_string_params,
                method=method, resource_path=path, request_context=request_context,
                event_context=context, stage_variables=stage_variables)
            if isinstance(result, FlaskResponse):
                response = flask_to_requests_response(result)
            elif isinstance(result, Response):
                response = result
            else:
                response = LambdaResponse()