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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则