lib/plugins/platform/platform.js/fetchEndpoint
function fetchEndpoint(provider, stage, region) {
  return provider
    .request(
      'CloudFormation',
      'describeStacks',
      { StackName: provider.naming.getStackName(stage) },
      stage,
      region
    )
    .then(result => {
      let endpoint = null;

      if (result) {
        result.Stacks[0].Outputs
          .filter(x => x.OutputKey.match(provider.naming.getServiceEndpointRegex()))
          .forEach(x => {
            endpoint = x.OutputValue;
          });
      }

      return endpoint;
    });
}