diff --git a/device/index.js b/device/index.js index 4fcd96f..95913ae 100644 --- a/device/index.js +++ b/device/index.js @@ -512,7 +512,7 @@ function DeviceClient(options) { } if (!isUndefined(options.host) && isUndefined(options.region)) { - var pattern = /[a-zA-Z0-9]+\.iot\.([a-z]+-[a-z]+-[0-9]+)\.amazonaws\..+/; + var pattern = /[a-zA-Z0-9]+\.iot\.([a-z]+[-[a-z]+]*-[a-z]+-[0-9]+)\.amazonaws\..+/; var region = pattern.exec(options.host); if (region === null) { console.log('Host endpoint is not valid');