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

preguntada hace 2 años737 visualizaciones
3 Respuestas
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
respondido hace 2 años
profile pictureAWS
EXPERTO
Chris_G
revisado hace 2 años
  • 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
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas