validateRegion() {
    // Those are the regions where AWS IoT Core is available
    const supportedRegions = [
      'us-east-1',
      'us-east-2',
      'us-west-1',
      'us-west-2',
      'ap-east-1',
      'ap-south-1',
      'ap-southeast-1',
      'ap-southeast-2',
      'ap-northeast-1',
      'ap-northeast-2',
      'ca-central-1',
      'eu-central-1',
      'eu-west-1',
      'eu-west-2',
      'eu-west-3',
      'eu-north-1',
      'me-south-1',
      'me-central-1',
      'sa-east-1',
    ]

    const regionSpecified =
      this.options.region || this.serverless.service.provider.region

    if (regionSpecified && !supportedRegions.includes(regionSpecified)) {
      throw new ServerlessError(
        `The "serverless dev" command does not support the "${regionSpecified}" region. Supported regions are: ${supportedRegions.join(', ')}.`,
        'UNSUPPORTED_REGION',
        { stack: false },
      )
    }
  }
Validates the region specified in the serverless.yml file or the command line options.
Specifically, makes sure the region is supported by AWS IoT Core.