### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I have the following resource in my CloudFormation template which creates an API Gateway Method with and Integration that has a Request Template:

```json
        "AppSignUpApiGatewayMethod": {
            "Type": "AWS::ApiGateway::Method",
            "Properties": {
                "AuthorizationType": "NONE",
                "HttpMethod": "ANY",
                "ResourceId": {
                    "Ref": "AppSignUpApiGatewayResource"
                },
                "RestApiId": {
                    "Ref": "AppApiGatewayRestApi"
                },
                "Integration": {
                    "IntegrationHttpMethod": "POST",
                    "Type": "AWS",
                    "Uri": {
                        "Fn::Sub": [
                            "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${lambdaArn}/invocations",
                            {
                                "lambdaArn": {
                                    "Fn::GetAtt": "AppSignUpLambdaFunction.Arn"
                                }
                            }
                        ]
                    },
                    "RequestTemplates": {
                        "application/json": "#set($allParams = $input.params())\n{\n\"body-json\" : $input.json(\"$\"),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"
                    },
                    "IntegrationResponses": [
                        {
                            "StatusCode": "200",
                            "ResponseParameters": {
                                "method.response.header.Access-Control-Allow-Origin": "'*'",
                                "method.response.header.Content-Type": "'text/html'"
                            },
                            "ResponseTemplates": {
                                "text/html": "$input.path('$')"
                            }
                        }
                    ]
                },
                "MethodResponses": [
                    {
                        "StatusCode": "200",
                        "ResponseParameters": {
                            "method.response.header.Access-Control-Allow-Origin": false,
                            "method.response.header.Content-Type": false
                        }
                    }
                ]
            }
        },
```

So that it's easier to read the request template is as follows:

```
#set($allParams = $input.params())
{
"body-json" : $input.json("$"),
"params" : {
#foreach($type in $allParams.keySet())
    #set($params = $allParams.get($type))
"$type" : {
    #foreach($paramName in $params.keySet())
    "$paramName" : "$util.escapeJavaScript($params.get($paramName))"
        #if($foreach.hasNext),#end
    #end
}
    #if($foreach.hasNext),#end
#end
},
"stage-variables" : {
#foreach($key in $stageVariables.keySet())
"$key" : "$util.escapeJavaScript($stageVariables.get($key))"
    #if($foreach.hasNext),#end
#end
},
"context" : {
    "api-id" : "$context.apiId",
    "api-key" : "$context.identity.apiKey",
    "http-method" : "$context.httpMethod",
    "stage" : "$context.stage",
    "source-ip" : "$context.identity.sourceIp",
    "user-agent" : "$context.identity.userAgent",
    "request-id" : "$context.requestId",
    "resource-id" : "$context.resourceId",
    "resource-path" : "$context.resourcePath"
    }
}
```

When I invoke lambda through API Gateway, I expect the `event` argument of the handler function to contain `stage-variables`, `context`, etc. However, I get the following:

```
{
    # Some other values removed for brevity
    "body": '{\n"body-json" : {},\n"params" : {\n\n    "path" : {\n    }\n    ,\n    "querystring" : {}\n    ,\n    "header" : {\n    }\n    },\n"stage-variables" : {\n},\n"context" : {\n    "api-id" : "4agib5ldvc",\n    "api-key" : "",\n    "http-method" : "GET",\n    "stage" : "STAGE",\n    "source-ip" : "172.17.0.1",\n    "user-agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0",\n    "request-id" : "ac8c1a09-56a5-4367-ace3-5eabf5510461",\n    "resource-id" : "buz8uugung",\n    "resource-path" : "/sign-up"\n    }\n}\n',
}
```

Everything is inside `event["body"]` as an unparsed JSON string.

### Expected Behavior

When I deploy the same CloudFormation template on AWS, `event` looks like this:

```
{
    "body-json": {},
    "params": {
        "path": {},
        "querystring": {},
        "header": {
            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
            "Accept-Encoding": "gzip, deflate, br",
            "Accept-Language": "en-US,en;q=0.5",
            "cache-control": "no-cache",
            "CloudFront-Forwarded-Proto": "https",
            "CloudFront-Is-Desktop-Viewer": "true",
            "CloudFront-Is-Mobile-Viewer": "false",
            "CloudFront-Is-SmartTV-Viewer": "false",
            "CloudFront-Is-Tablet-Viewer": "false",
            "CloudFront-Viewer-ASN": "16342",
            "CloudFront-Viewer-Country": "PL",
            "Cookie": "__stripe_mid=b6c6f963-d084-4f95-a08b-517e5a4e4916740344; __stripe_sid=b9c4f39e-78b5-4caf-8d8a-86da120a9b2bec82a0; basic_user_qty=1; number_type=toll_free; package=voip_user_tiered; pdc_lead_session_token=3593c55a-4ec3-422c-9da7-64fb3e6df38c; plus_user_qty=0; pro_user_qty=0",
            "Host": "ck764avt73.execute-api.us-west-1.amazonaws.com",
            "pragma": "no-cache",
            "sec-fetch-dest": "document",
            "sec-fetch-mode": "navigate",
            "sec-fetch-site": "none",
            "sec-fetch-user": "?1",
            "upgrade-insecure-requests": "1",
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0",
            "Via": "2.0 3157923491f1e8705fd766b0cf62e414.cloudfront.net (CloudFront)",
            "X-Amz-Cf-Id": "tqYimyyEEgmbW6EjuC6duCyflAGWrqaIs6KQD44Lx8pl85yu5pEIVA==",
            "X-Amzn-Trace-Id": "Root=1-62d02d39-46a0e37359519e081b807920",
            "X-Forwarded-For": "77.237.9.30, 130.176.211.47",
            "X-Forwarded-Port": "443",
            "X-Forwarded-Proto": "https",
        },
    },
    "stage-variables": {},
    "context": {
        "api-id": "ck764avt73",
        "api-key": "",
        "http-method": "GET",
        "stage": "STAGE",
        "source-ip": "77.237.9.30",
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0",
        "request-id": "cb341fd4-a781-453c-b91e-999ed040b642",
        "resource-id": "721t4i",
        "resource-path": "/sign-up",
    },
}
```

In other words, in AWS, `event` becomes the parsed version of `event["body"]` from LocalStack.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

This is the config I use for docker compose:

```yaml
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
    image: localstack/localstack:1.0.0
    network_mode: bridge
    ports:
      # https://github.com/localstack/localstack/issues/3080#issuecomment-966182047
      - "4510-4559:4510-4559"  # external service port range
      - "4566:4566"            # LocalStack Edge Proxy
    environment:
      - DEBUG=${DEBUG-}
      - DATA_DIR=${DATA_DIR-}
      - LAMBDA_EXECUTOR=docker-reuse
      - HOST_TMP_FOLDER=${TMPDIR:-/tmp/}localstack
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      # https://github.com/localstack/localstack/issues/2515
      #- "${TMPDIR:-/tmp}/localstack:/tmp/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"
```

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

I use `update_stack` from boto3 to deploy the CloudFormation template. Deploy succeeds.


### Environment

```markdown
- OS: macOS 12.4
- LocalStack: 1.0.0
```


### Anything else?

_No response_
if not is_api_key_required:
        return True
    api_key = headers.get("X-API-Key")
    if not api_key:
        return False
    return validate_api_key(api_key, stage)
def update_content_length(response: Response):
    if response and response.content is not None:
        response.headers["Content-Length"] = str(len(response.content))
def apply_request_parameters(
    uri: str, integration: Dict[str, Any], path_params: Dict[str, str], query_params: Dict[str, str]
):
    request_parameters = integration.get("requestParameters")
    uri = uri or integration.get("uri") or integration.get("integrationUri") or ""
    if request_parameters:
        for key in path_params:
            
            request_param_key = f"integration.request.path.{key}"
            request_param_value = f"method.request.path.{key}"
            if request_parameters.get(request_param_key) == request_param_value:
                uri = uri.replace(f"{{{key}}}", path_params[key])
    if integration.get("type") != "HTTP_PROXY" and request_parameters:
        for key in query_params.copy():
            request_query_key = f"integration.request.querystring.{key}"
            request_param_val = f"method.request.querystring.{key}"
            if request_parameters.get(request_query_key, None) != request_param_val:
                query_params.pop(key)
    return add_query_params_to_url(uri, query_params)
def apply_response_parameters(invocation_context: ApiInvocationContext):