1

Using the aws sagemaker cli tools it's possible to invoke endpoint that are hosted in sagemaker using a command like:

aws sagemaker-runtime invoke-endpoint --body file://container/local_test/payload.json \ --endpoint-name $(DEPLOYMENT_NAME)-staging \ --content-type application/json \ --accept application/json \ output.json 

By default, this command goes to the /invocations endpoint. Is it possible to go to a different endpoint? For example, if I implemented a health-report endpoint? It's definately possible to make one as in the BYOM example. I'm just not sure how I'd access it.

Thanks!

2 Answers 2

1

Currently sagemaker-runtime has a single invoke-endpoint method.
Calling other REST resources is most likely doable if you'll call the endpoint URL yourself over HTTP (that is without using aws sagemaker-runtime), however, you'll probably need to take care of the required sigv4 authentication header.

Sign up to request clarification or add additional context in comments.

Comments

1

/invocations is not a SageMaker Endpoint, it's a HTTP request path where the prediction request is handled.

See documentation: https://docs.aws.amazon.com/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html

Request syntax:
POST /endpoints/EndpointName/invocations HTTP/1.1
Content-Type: ContentType
Accept: Accept

To your endpoint, the request is like:
POST /endpoints/$(DEPLOYMENT_NAME)-staging/invocations HTTP/1.1
Content-Type: ContentType
Accept: Accept

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.