# Connecting to Temporal Cloud through Python SDK

**URL:** https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886
**Category:** Community Support
**Tags:** python-sdk
**Created:** [March 20, 2025, 5:30pm UTC](https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886 "2025-03-20T17:30:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sophia](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sophia](https://community.temporal.io/u/sophia)
#### Post date: [March 20, 2025, 5:30pm UTC](https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886/1 "2025-03-20T17:30:44Z")

</div>

Hello,

I am trying to connect to Temporal Cloud through the Python SDK. I am using this exact template [documentation/sample-apps/python/your\_app/connect\_cloud\_dacx.py at main · temporalio/documentation · GitHub](https://github.com/temporalio/documentation/blob/main/sample-apps/python/your_app/connect_cloud_dacx.py) except with an updated “your-custom-namespace.account-id.tmprl.cloud:7233” and namespace=“.”. I have also confirmed that my client-cert.pem and client-private-key.pem are the correct pem format.

I am unable to connect to Temporal Cloud and am getting this error.

```auto
File "/home/service-user/.local/lib/python3.11/site-packages/temporalio/bridge/client.py", line 97, in connect
    await temporalio.bridge.temporal_sdk_bridge.connect_client(
RuntimeError: Failed client connect: `get_system_info` call error after connection: Status { code: Unknown, message: "transport error", source: Some(tonic::transport::Error(Transport, hyper::Error(Io, Custom { kind: InvalidData, error: "received fatal alert: IllegalParameter" }))) }

```

Do you have any insight into what is causing this error?

---

<div class="post-metadata">

### Author: ![ishaq\_shaikh](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@ishaq\_shaikh](https://community.temporal.io/u/ishaq_shaikh)
#### Post date: [March 20, 2025, 7:11pm UTC](https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886/2 "2025-03-20T19:11:25Z")

</div>

Hi @sophia

1. can you share temporal SDK version you are currently using?
2. share the `main()` function definition.
3. Also, does the `client-cert.pem` and `client-private-key.pem` resides in the same folder wherein you running the `connect_cloud_dacx.py`?

---

<div class="post-metadata">

### Author: ![sophia](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sophia](https://community.temporal.io/u/sophia)
#### Post date: [March 20, 2025, 8:11pm UTC](https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886/3 "2025-03-20T20:11:53Z")

</div>

1. SDK Version: temporalio-1.10.0
2. The main() function definition is the same as the definition given in the template, except with my personal “your-custom-namespace.account-id.tmprl.cloud:7233” and namespace=“.”
3. They do reside in the same folder and I have checked that the contents are within the respective variables

Are you able to use this template and connect to your own Temporal Cloud on your end?

---

<div class="post-metadata">

### Author: ![ishaq\_shaikh](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@ishaq\_shaikh](https://community.temporal.io/u/ishaq_shaikh)
#### Post date: [March 21, 2025, 1:44am UTC](https://community.temporal.io/t/connecting-to-temporal-cloud-through-python-sdk/16886/4 "2025-03-21T01:44:09Z")

</div>

yes, running the same python template on my python3.11 venv with the same temporal sdk version worked fine, i can see the workflow running on the temporal cloud console.

Below are the references:

**[1] venv setup + execution of the template**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/a/a8b132ac97bfbdce776dedc8ddd236aadecd86e1.png)

**[2] workflow running on temp-cloud**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/3/3184f8154c26c4b44e9eb82f223262b7fbd47f99.png)

**[3] Template changes made with client-cert.pem and client-private-key.pem being in the same folder.**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/c/cbda7904bd5f98efd58e06554a11cfb99342ead3.png)

Can you once manually test the connection to see if the TLS handshake works with the respective .pem pair? Or any error you faced during the ssl-handshake verification stage

`openssl s_client -connect <your-namespace>.<accound-id>.tmprl.cloud:7233 -cert client-cert.pem -key client-private-key.pem `
