Amazon SageMaker endpoint via Amazon API Gateway and AWS Lambda

Amazon API Gateway → AWS Lambda → Amazon SageMaker

Deploys a SageMaker Jumpstart model endpoint and an API Gateway endpoint.

The model deployed in this pattern can be changed by modifying the MODEL_ID attribute in app.py file.
The API Gateway is protected using an API Key. To query the API Gateway endpoint, x-api-key header needs to be added to the HTTP request.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-lambda-sagemaker-jumpstartendpoint-cdk-python

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Kaustav Dey

Kaustav Dey

Solution Architect at AWS

Follow on LinkedIn