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

# Type of request: This is a ...

[x ] bug report
[ ] feature request

# Detailed description

Not able to use the edge service to write metric data to cloudwatch via the javascript aws-sdk.

However, It **DOES** work when using the deprecated cloudwatch port.

## Expected behavior

Metric data to be visible when calling `awslocal cloudwatch list-metrics`

## Actual behavior

404 from edge service. No metric data is persisted, localstack instance logs the following info:

```
INFO:localstack.services.edge: Unable to determine forwarding port for API "monitoring" - please make sure this API is enabled via the SERVICES configuration
```

# Steps to reproduce

Run JS code in "Client code" section.
See 404 Error

## Command used to start LocalStack

`TMPDIR=/tmp/localstack docker-compose up`

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

```js
const AWS = require('aws-sdk')
const cw = new AWS.CloudWatch({
  endpoint: 'http://localhost:4566',
})

const data = {
  Namespace: 'ns',
  MetricData: [
    {
      MetricName: 'metric-name',
      Timestamp: new Date(),
      Value: 12345,
      Unit: 'Milliseconds',
      Dimensions: [
        { Name: 'Environment', Value: 'local' },
      ]
    }
  ]
}

cw.putMetricData(data, (err, data) => {
  if (err) {
      console.log('Error', err)
  } else {
      console.log('Success', JSON.stringify(data))
  }
})
```

"""
    Extracts a Zipfile entry and preserves permissions
    """
    zip_ref.extract(file_entry.filename, path=target_dir)
    out_path = os.path.join(target_dir, file_entry.filename)
    perm = file_entry.external_attr >> 16
    os.chmod(out_path, perm or 0o777)
def untar(path, target_dir):
    mode = 'r:gz' if path.endswith('gz') else 'r'
    with tarfile.open(path, mode) as tar:
        tar.extractall(path=target_dir)
def zip_contains_jar_entries(content, jar_path_prefix=None, match_single_jar=True):
    try:
        with tempfile.NamedTemporaryFile() as tf:
            tf.write(content)
            tf.flush()
            with zipfile.ZipFile(tf.name, 'r') as zf:
                jar_entries = [e for e in zf.infolist() if e.filename.lower().endswith('.jar')]
                if match_single_jar and len(jar_entries) == 1 and len(zf.infolist()) == 1:
                    return True
                matching_prefix = [e for e in jar_entries if
                    not jar_path_prefix or e.filename.lower().startswith(jar_path_prefix)]
                return len(matching_prefix) > 0
    except Exception:
        return False
def is_jar_archive(content):