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

asked 2 years ago716 views
3 Answers
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
answered 2 years ago
profile pictureAWS
EXPERT
Chris_G
reviewed 2 years ago
  • 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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions