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

gefragt vor 3 Jahren297 Aufrufe
1 Antwort
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.

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen