What is a is the curl command to make a POST request to sage-maker and receive a ML inference?
- 3@JohnRotenstein This question is actually pretty clear if you have a decent level of exposure to SageMaker. Googling 'sagemaker post inference" gives the second response that should cover any missing background on what the OP is asking.user3002273– user30022732018-01-18 18:32:04 +00:00Commented Jan 18, 2018 at 18:32
4 Answers
If you want to simply send a POST request and check, you can use the postman and in the Authorization tab select the AWS Signature and add the Access and Secret key from the aws account.
But as mentioned it is recommended to use the Sage maker run time client for API call invocations.
1 Comment
Rather than using curl, it's recommended that you use the SageMaker Runtime client to send data and get back inferences from a SageMaker Endpoint:
http://docs.aws.amazon.com/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html
Comments
If you want to expose your model predicitions to the world I recommend you to follow these tutorials:
You basically need:
- create an Endpoint using the Sagemaker Estimator
- use boto3 inside a lambda function to talk to the SageMaker endpoint
- create an API Gateway so you create a resource to talk to the lambda function from the outside world. e.g. using CURL
Note: there are many permissions involved.
