title: AWS Transcribe error on iOS: A server with the specified hostname could not be found
body: <p>The code below generates this error with AWS Transcribe on iOS:</p>
  
  <blockquote>
    <p>Task &lt;1B377509-91AE-43C0-8F24-F28FE7B583AC>.&lt;1> load failed with error
    Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified
    hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=8,
    NSUnderlyingError=0x283cb55f0 {Error Domain=kCFErrorDomainCFNetwork
    Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8,
    _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;1B377509-91AE-43C0-8F24-F28FE7B583AC>.&lt;1>,
    _NSURLErrorRelatedURLSessionTaskErrorKey=(
        "LocalDataTask &lt;1B377509-91AE-43C0-8F24-F28FE7B583AC>.&lt;1>" ), NSLocalizedDescription=A server with the specified hostname could not
    be found.,
    NSErrorFailingURLStringKey=<a href="https://transcribe.us-west-1.amazonaws.com/" rel="nofollow noreferrer">https://transcribe.us-west-1.amazonaws.com/</a>,
    NSErrorFailingURLKey=<a href="https://transcribe.us-west-1.amazonaws.com/" rel="nofollow noreferrer">https://transcribe.us-west-1.amazonaws.com/</a>,
    _kCFStreamErrorDomainKey=12} [-1003]</p>
  </blockquote>
  
  <p>US-West1 is a supported region for AWS Transcribe. Why is this error happening?</p>
  
  <pre><code>class TranscriptionNewViewController: UIViewController {
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
  
      // =============================================================================================================
      // MARK: Transcription Functions
      // =============================================================================================================
      fileprivate func transcribe() {
          let fileURL = "https://s3-us-west-2.amazonaws.com/blahblahblah/Sample1.mp3"
  
          let jobName = "sample1"
          let languageCode = AWSTranscribeLanguageCode.enUS
          let mediaFormat = AWSTranscribeMediaFormat.mp3
          let media = AWSTranscribeMedia()
          media?.mediaFileUri = fileURL
  
          let jobRequest = AWSTranscribeStartTranscriptionJobRequest()
          jobRequest?.transcriptionJobName = jobName
          jobRequest?.languageCode = languageCode
          jobRequest?.mediaFormat = mediaFormat
          jobRequest?.media = media
  
          let transcribeClient = AWSTranscribe.default()
  
          DispatchQueue.global(qos: .background).async {
              transcribeClient.startTranscriptionJob(jobRequest!) { response, error in
                  guard let response = response else {
                      print("Failed to start transcription")
                      return
                  }
  
                  print(response.transcriptionJob!.transcriptionJobStatus == .inProgress, "Status should have been in progress, but was \(response.transcriptionJob!.transcriptionJobStatus)")
  
                  self.transcribeJobDidFinish()
              }
          }
  
          // Print status
          print("Started transcription")
      }
  
  
      fileprivate func transcribeJobDidFinish() {
  
      }
  
  
      // =============================================================================================================
      // MARK: IB Actions
      // =============================================================================================================
      @IBAction func transcribeButtonDidTap(_ sender: UIButton) {
          transcribe()
      }
  
  
      // =============================================================================================================
      // MARK: UIViewController Functions
      // =============================================================================================================
      override var prefersStatusBarHidden: Bool {
          return true
      }
  
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
      }
  }
  </code></pre>