K Means Predictor - SSL Validation Failing

0

I have been following this tutorial to deploy a K Means model, but am running into the following error after executing the following code:

result = kmeans_predictor.predict(train_data_scaled.to_numpy().astype('float32'))

Error:

SSL validation failed for https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/kmeans-2023-05-17-18-31-32-503/invocations EOF occurred in violation of protocol (_ssl.c:2396)

Through some research, I understand that this is an issue with my endpoint, but I am unsure of how to properly establish or pass this to the predictor.

For reference, when I establish the predictor, it appears to successfully create an endpoint. Successfully creating endpoint

已提問 1 年前檢視次數 213 次
1 個回答
0

If you're running the Python script in a corporate network, SSL/TLS inspection or interception could be causing this problem. Check with your network administrator to see if this is the case. other than this you can check your python or you can upgrade your packages

pip install --upgrade requests urllib3 botocore
pip install --upgrade sagemaker

As a last resort, you can disable SSL verification to see if that resolves the problem. However, for security reasons, this is generally not recommended. If you try this, you should only do so for debugging purposes, and you should re-enable SSL verification as soon as you're finished.

import os
os.environ['AWS_CA_BUNDLE'] = ''
profile picture
專家
已回答 1 年前
  • I am on the amazon internal VPN - could be be part of the issue?

    I separately tried the pip upgrades as well as the os work around and neither changed anything unfortunately.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南