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

preguntada hace un año213 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace un año
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas