<!-- 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))
  }
})
```

if not message:
        message = 'Unknown error'
    if not error_type:
        error_type = 'UnknownError'
    if 'com.amazonaws.dynamodb' not in error_type:
        error_type = 'com.amazonaws.dynamodb.v20120810#%s' % error_type
    content = {
        'message': message,
        '__type': error_type
    }
    return make_response(jsonify(content), code)
def get_kinesis_stream_name(table_name):
    return DDB_KINESIS_STREAM_NAME_PREFIX + table_name
def table_name_from_stream_arn(stream_arn):
    return stream_arn.split(':table/')[1].split('/')[0]
def stream_name_from_stream_arn(stream_arn):
    table_name = table_name_from_stream_arn(stream_arn)
    return get_kinesis_stream_name(table_name)
def random_id(stream_arn, kinesis_shard_id):
    namespace = uuid.UUID(bytes=hashlib.sha1(to_bytes(stream_arn)).digest()[:16])
    if six.PY2:
        kinesis_shard_id = to_bytes(kinesis_shard_id, 'utf-8')
    return uuid.uuid5(namespace, kinesis_shard_id).hex
def shard_id(stream_arn, kinesis_shard_id):
    return '-'.join([kinesis_shard_id, random_id(stream_arn, kinesis_shard_id)])
def kinesis_shard_id(dynamodbstream_shard_id):
    return dynamodbstream_shard_id.rsplit('-', 1)[0]
def serve(port, quiet=True):
    generic_proxy.serve_flask_app(app=app, port=port, quiet=quiet)