amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Sagemaker runtime_client.invoke_endpoint not handling redirect

Open nallagangus opened this issue 3 years ago • 0 comments

Got a custom inference container on sagemaker. Addresses sagemaker /ping and /invocations on port 8080 as per spec.

However internally custom container redirects URI /invocations to a different /original_predict_uri.

=================================== response = runtime_client.invoke_endpoint( EndpointName=endpoint_name, ContentType="application/json", Body=payload ) result = response["Body"].read().decode("ascii") '\nRedirecting...\n

Redirecting...

\n

You should be redirected automatically to target URL: http://localhost:9090/sunallscrtree1. If not click the link.'

When I make a curl request to this container (outside sagemaker runtime) for this it addresses by passing --location to CURL /clients to follow HTTP redirects by default.

Can sagameker runtime address this redirects?

Sudhir

nallagangus avatar Mar 20 '22 21:03 nallagangus