message: more generic approach for s3 tempurl generation
  this version also matches non aws systems
diff: @@ -5,11 +5,6 @@ const S3 = require('aws-sdk/clients/s3');
  const makeS3TempLink = async (restore /* : Object */) => {
  const restoreLocation = R.prop('restoreLocation', restore);
  - // s3.{region}.amazonaws.com/{bucket}/{key}
  - const s3LinkMatch = /s3\.([^.]+)\.amazonaws\.com\/([^/]+)\/([^/]+)/;
  -
  - if (R.test(s3LinkMatch, restoreLocation)) {
  - const s3Parts = R.match(s3LinkMatch, restoreLocation);
  const accessKeyId = R.propOr(
  'XXXXXXXXXXXXXXXXXXXX',
  @@ -22,14 +17,19 @@ const makeS3TempLink = async (restore /* : Object */) => {
  process.env,
  );
  - // We have to generate a new client every time because the region is parsed
  + // https://{endpoint}/{bucket}/{key}
  + const s3LinkMatch = /([^/]+)\/([^/]+)\/([^/]+)/;
  +
  + const s3Parts = R.match(s3LinkMatch, restoreLocation);
  +
  + // We have to generate a new client every time because the endpoint is parsed
  // from the s3 url.
  const s3Client = new S3({
  accessKeyId,
  secretAccessKey,
  s3ForcePathStyle: true,
  signatureVersion: 'v4',
  - region: R.prop(1, s3Parts),
  + endpoint: `https://${R.prop(1, s3Parts)}`,
  });
  const tempUrl = s3Client.getSignedUrl('getObject', {
  @@ -42,9 +42,6 @@ const makeS3TempLink = async (restore /* : Object */) => {
  ...restore,
  restoreLocation: tempUrl,
  };
  - }
  -
  - return restore;
  };
  const Helpers = {
  