aws-samples / sagemaker-custom-project-templates

MIT No Attribution
214 stars 156 forks source link

Created a template to deploy API Gateway + Serverless endpoint #37

Closed shinglyu closed 2 years ago

shinglyu commented 2 years ago

Issue #, if available: N/A

Description of changes: This adds a new template to automate the deployment of models in the Amazon SageMaker model registry to SageMaker Serverlss Endpoints with a API Gateway for real-time inference. This project is derived from the built-in MLOps template for model deployment but uses serverless inference endpoints + API Gateway to provide a REST API.

@dgallitelli kindly agreed to review this PR. This will serve as an example used in a upcoming workshop material.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dgallitelli commented 2 years ago

Missing permissions to update a running project for the LaunchRole created in the template. Suggest reverting to default product launch role (however note PR#39) or add to your custom one.

Approved for merge once fixed.

dgallitelli commented 2 years ago

Found a DataCaptureUploadPath issue when deploying as well. Some leftovers from real-time/asynchronous endpoints?

image

kirit93 commented 2 years ago

Please take a look at the template for GitLab. The expectation for contributions is to automate the creation of the Service Catalog Product. The main readme in this repo provides a CFN template to create a Portfolio and each project template should have a CFN template to create a Product within that folder. Please update this PR so a user can leverage this template with a single CFN template.

dgallitelli commented 2 years ago

@kirit93 isn't it already like this? This PR follows the example of the serverless endpoint template, providing a single CFN file. The README file explains this also.

shinglyu commented 2 years ago

For some weird reason this file: https://github.com/shinglyu/sagemaker-custom-project-templates/blob/api-gateway-serverless/api-gateway-serverless/create-api-gateway-serverless-product.yaml shows up in my fork, but not in the PR. Must be something wrong with the github diff algorithm or UI?

shinglyu commented 2 years ago

If I do a git diff upstream/main on my local computer (upstream is this aws-samples/sagemaker-custom-packages-templates repo), I can see that file as well: Screenshot 2022-08-25 at 19 17 58

shinglyu commented 2 years ago

@kirit93 I think I know why, the file https://github.com/aws-samples/sagemaker-custom-project-templates/pull/37/files#diff-13890f9e344706cad5a42295d1638cf9e82e1f17f65787ae8851fed6d9878f89 is too long so is hidden by default by GitHub. That's why it's not obvious to see at first glance. Screenshot 2022-08-25 at 19 21 07