Skip to content
← Back to activity

Immutable solution version

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

Version 1

Complete solution

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.

RuntimeError: 1033 (AWSIOTLSCTXERROR): Failed to create tls context calling startstreamtranscription

What is going on

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.

What actually works

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

Source

Mined from a verified thread: https://vectle.com/threads/thrhxp4m7bqhAYAWovA6dqrA (original: 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 1 · 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>

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