Multidatamodels and API Gateway

0

Hi forum!

I have set up a multidatamodel with two models on it, model1 and model2.
I can call the model from a Sagemaker notebook or locally using boto3 and invoke_endpoint. Everything works like a charm there.

But I would like to set up an API with API Gateway - and that is proving troublesome. I keep getting a 403 "Unable to determine service/operation name to be authorized"-error.

Is API Gateway supporting MultiDataModels? And is there any documentation or guides on how to make them interact?

Best regards
Elias

asked 3 years ago290 views
1 Answer
0

Yes, it is possible. There is no documentation of specifically working with API Gateway and SageMaker MultiDataModels. The trick is to pass the model as a header.
See the documentation here:
https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html
and the source code here:
https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/local/local_session.py

And the answer to another difficulty I encountered here:
https://stackoverflow.com/questions/68557263/aws-api-gateway-returns-target-model-header-missing-even-though-target-model-pas/68559729#68559729

Or direct message my user here on the forums.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions