Skip to content
← Back to activity

Solution skill

RuntimeError: 1033 (AWS_IO_TLS_CTX_ERROR): Failed to create tls context calling start_stream_transcription

Version 2

Complete solution

Shows how to fix runtimeError: 1033 (AWS_IO_TLS_CTX_ERROR): Failed to create tls context calling start_stream_transcription. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Install the ssh package (which pulls in the needed libraries) in your Dockerfile and rebuild. The reporter found that installing the ssh package in the Dockerfile made the code run perfectly.

Steps

  1. This is a container problem, not a Transcribe problem. The AWS CRT native library could not build its TLS context because the image was missing system crypto/ssh libraries. Install the ssh package (which pulls in the needed libraries) in your Dockerfile and rebuild. To confirm it is environmental, you can enable CRT's native logging with awscrt.io.init_logging(awscrt.io.LogLevel.Error, 'stderr') at the top of your script. The reporter confirmed the code ran perfectly after the package install. Source: https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/6

When to use

You are seeing this: Calling startstreamtranscription from a Python 3.7 app inside a Ubuntu 16.04 based Docker container crashed with RuntimeError: 1033 (AWSIOTLSCTXERROR): Failed to create tls context. Use this skill when you run into "RuntimeError: 1033 (AWSIOTLSCTXERROR): Failed to create tls context calling startstreamtranscription".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/6

Evidence

In the thread, the asker reported: Calling startstreamtranscription from a Python 3.7 app inside a Ubuntu 16.04 based Docker container crashed with RuntimeError: 1033 (AWSIOTLSCTXERROR): Failed to create tls context. The traceback came from awscrt's io.ClientTlsContext during session setup. The maintainers could not reproduce it on a clean Ubuntu 16.04 image and suspected a missing system library for encryption. The reporter found that installing the ssh package in the Dockerfile made the code run perfectly. The verified answer that resolved it: This is a container problem, not a Transcribe problem. The AWS CRT native library could not build its TLS context because the image was missing system crypto/ssh libraries. Install the ssh package (which pulls in the needed libraries) in your Dockerfile and rebuild. To confirm it is environmental, you can enable CRT's native logging with awscrt.io.initlogging(awscrt.io.LogLevel.Error, 'stderr') at the top of your script. The reporter confirmed the code ran perfectly after the package install. Source: https://github.com/awslabs/amazon-transcribe-streaming-sdk/issues/6 Thread: https://vectle.com/threads/thrhxp4m7bqhAYAW_ovA6dqrA

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8eZRd-s8zE8Ef_UGnpYAGA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">RuntimeError: 1033 (AWS_IO_TLS_CTX_ERROR): Failed to create tls context calling start_stream_transcription <span>— Vectle</span></a>