# Bug report

# Detailed description

The `AWS.s3.upload()` (official SDK - https://github.com/aws/aws-sdk-js) returns an object with the `Location` key that points to 4566 instead of 4572 (LocalStack S3 port).

## Expected behavior

The `Location` should point to the file on S3.

Example:

```
Location: http://localhost:4572/path/to/bucket.txt
```

## Actual behavior

The `Location` points to the LocalStack entrypoint.

Example:

```
Location: http://localhost:4566/path/to/bucket.txt
```

# Steps to reproduce

- Upload a file to S3 using the official AWS SDK (https://github.com/aws/aws-sdk-js).
- Check out the `Location` property.

## Client code

```javascript
const AWS = require('aws-sdk');
const s3 = new AWS.S3({
  region: 'us-west-1',
  endpoint: 'http://localhost:4566',
  apiVersion: '2006-03-01',
  s3ForcePathStyle: true,
});

(async () => {
  await s3
    .createBucket({ Bucket: 'my-bucket', ACL: 'private' })
    .promise();

  const { Location } = await s3
    .upload({ Key: 'file.txt', Body: 'test', Bucket: 'my-bucket' })
    .promise();

  console.assert(Location === 'http://localhost:4572/my-bucket/file.txt');
})();
```
return 200
        
        headers.get(HEADER_KILL_SIGNAL) and os._exit(0)
        target = headers.get('x-amz-target', '')
        auth_header = headers.get('authorization', '')
        host = headers.get('host', '')
        headers[HEADER_LOCALSTACK_EDGE_URL] = 'https://%s' % host
        
        _, port, path, host = get_api_from_headers(headers, path)
        if not port:
            
            if 'AWSAccessKeyId=' in path or 'Signature=' in path:
                port = config.PORT_S3
        if not port:
            LOG.info('Unable to find forwarding rule for host "%s", path "%s", target header "%s", auth header "%s"' %
                     (host, path, target, auth_header))
            response = Response()
            response.status_code = 404
            response._content = '{"status": "running"}'
            return response
        use_ssl = config.USE_SSL
        connect_host = '%s:%s' % (config.HOSTNAME, port)
        url = 'http%s://%s%s' % ('s' if use_ssl else '', connect_host, path)
        headers['Host'] = host
        function = getattr(requests, method.lower())
        if isinstance(data, dict):
            data = json.dumps(data)
        response = function(url, data=data, headers=headers, verify=False)
        return response
def get_api_from_headers(headers, path=None):