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

질문됨 3년 전297회 조회
1개 답변
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.

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠