1

SageMaker provides a full machine learning development environment on AWS. It works with the Amazon SageMaker Python SDK, which allows Jupyter Notebooks to interact with the functionality. This also provides the path to using the Amazon SageMaker Feature Store.

Is there any REST API available for SageMaker? Say one wanted to create their own custom UI, but still use SageMaker features, is this possible?

Can it be done using the Amazon API Gateway?

Cybernetic
  • 12,628
  • 16
  • 93
  • 132

2 Answers2

1

I think you're better off wrapping the functionalities you need as an API you own to avoid the timeouts associated with REST. Did you check out https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html as well?

  • You’re saying create the API through AWS API Gateway, which calls the individual services I need; the same services SageMaker would be using anyway? – Cybernetic Jul 08 '21 at 13:21
  • 1
    Yup. Please be mindful that some operations take a lot of time. Good thing is - you have more control. – anil ravuri Jul 11 '21 at 07:30
1

Amazon API Gateway currently does not provide first-class integration for SageMaker. But you can use these services via AWS SDK. If you wish, you can embed the AWS SDK calls into a service, host on AWS (e.g. running on EC2 or as lambda functions) and use API gateway to expose your REST API.

Actually, SageMaker is not fundamentally different from any other AWS service from this aspect.

andras
  • 155
  • 4
  • So by first class integration you mean the endpoints to SageMaker are not made available directly, inside API Gateway, and thus I would need to create my own API, by sitting AWS SDK code inside a lambda container and making it available to the AWS API Gateway. – Cybernetic Jul 17 '21 at 00:03
  • 1
    Yes, with one exception. If you just want to call a SageMaker model endpoint, you don't necessarily need lambda. API GW can integrated with SageMaker endpoints (https://aws.amazon.com/blogs/machine-learning/creating-a-machine-learning-powered-rest-api-with-amazon-api-gateway-mapping-templates-and-amazon-sagemaker/). However, if you'd like to submit e.g., training jobs through a REST API (instead of calling the SageMaker API directly), you need to have some sort of backend service which can translate this request. – andras Jul 24 '21 at 23:36