Automatically detect idle sageaker endoint

0

Hello, My aim is to detect if the sagemaker endpoint is idle for more than x hours and then delete the endpoint. I will then recreate the endpoint in my first call as part of my architecture. I could not find anyway how i can know from my lambda if the sagemaker endpoint is idle or not. Is there anyway, I can implement the same? Thanks

已提問 2 年前檢視次數 737 次
3 個答案
1

Hello, you could for example define a CloudWatch alarm to monitor the endpoint Invocations metric (metrics details on this link), so that an amount over a given period under a specific threshold could send a message to an SNS topic. Then you can have a Lambda function automatically triggered to consume that message to perform a specific action on the endpoint

A couple of references from AWS documentation:

AWS
已回答 2 年前
profile pictureAWS
專家
Chris_G
已審閱 2 年前
  • If that answer helps you, please mark that as Accepted Answer

0
  • This only applies to SageMaker studio resources (eg. KernelGateways), in this case, the user is talking about SageMaker Real-time endpoints

0

This use case is better suited for SageMaker Serverless Inference. Serverless Inference is ideal for workloads which have idle periods between traffic spurts and can tolerate cold starts.

You might also consider SageMaker Asynchronous Inference, which enables you to save on costs by autoscaling the instance count to zero when there are no requests to process, so you only pay when your endpoint is processing requests.

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南