<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

# Type of request: This is a ...

[*] bug report
[ ] feature request

# Detailed description

Sending CloudWatch metrics data using `content-encoding: gzip` encoding results in 404. The same metrics sent uncompressed using `content-encoding: identity` returns 200 OK.

The metrics compressed with `content-encoding: gzip` work against AWS CloudWatch.

According to [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html) `PutMetricData` accepts `gzip` compressed payloads but the docs are not clear on content-encoding at that point.

> Each PutMetricData request is limited to 40 KB in size for HTTP POST requests. You can send a payload compressed by gzip. Each request is also limited to no more than 20 different metrics.

## Expected behavior

I expected `localstack` `cloudwatch` to be able to receive `gzip` encoded payloads.

## Actual behavior

`encoding: gzip` results in HTTP error 404.

# Steps to reproduce

The Elixir library `telemetrics_library_cloudwatch` uses `gzip` compression by default. I configured a bunch of metrics and configured the library to periodically send the metrics. This resulted in 404 failures.

The requests against the `localstack` container started working when I commented out the `gzip` content type setting in line 12 of `TelemetryMetricsCloudWatch.Cloudwatch` module [here](https://github.com/bmuller/telemetry_metrics_cloudwatch/blob/2293af20e80c058338c8d4248191518642484986/lib/telemetry_metrics_cloudwatch/cloudwatch.ex#L12)

Apologies for not having simpler steps to reproduce.

## Command used to start LocalStack

Docker Compose with following settings:

```
  localstack:
    image: localstack/localstack:0.12.3
    restart: always
    environment:
      - SERVICES=s3,cloudwatch
      - DEFAULT_REGION=eu-west-2
      - DEBUG=1
      - DATA_DIR=/tmp/localstack/data
      - DOCKER_HOST=unix:///var/run/docker.sock
      - HOST_TMP_FOLDER=/tmp/localstack
    ports:
      - 4566-4599:4566-4599
    volumes:
      - /tmp/localstack:/tmp/localstack
      - /var/run/docker.sock:/var/run/docker.sock
```

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



if headers.get('Accept-Encoding') == 'gzip' and response._content:
            response._content = gzip.compress(to_bytes(response._content))
            response.headers['Content-Length'] = str(len(response._content))
            response.headers['Content-Encoding'] = 'gzip'
def do_forward_request(api, method, path, data, headers, port=None):
    if config.FORWARD_EDGE_INMEM:
        result = do_forward_request_inmem(api, method, path, data, headers, port=port)
    else:
        result = do_forward_request_network(port, method, path, data, headers)
    if hasattr(result, 'status_code') and result.status_code >= 400 and method == 'OPTIONS':
        
        return 200
    return result
def do_forward_request_inmem(api, method, path, data, headers, port=None):
    listener_details = PROXY_LISTENERS.get(api)
    if not listener_details:
        message = 'Unable to find listener for service "%s" - please make sure to include it in $SERVICES' % api
        LOG.warning(message)
        raise HTTPErrorResponse(message, code=400)
    service_name, backend_port, listener = listener_details
    
    client_address = LOCALHOST_IP
    server_address = headers.get('host') or LOCALHOST
    forward_url = 'http://%s:%s' % (config.HOSTNAME, backend_port)
    response = modify_and_forward(method=method, path=path, data_bytes=data, headers=headers,
        forward_base_url=forward_url, listeners=[listener], request_handler=None,
        client_address=client_address, server_address=server_address)
    return response
def do_forward_request_network(port, method, path, data, headers):