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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ