Dev and test SageMaker real-time endpoints with measured idle hours that could be torn down off-hours
What does ZopNight detect here?
ZopNight flags in-service, single-variant SageMaker real-time endpoints named as dev or test, and not tagged or named as production, when their weekly pattern shows idle hours. SageMaker endpoints have no stop action, so ZopNight recommends deleting the endpoint off-hours and recreating it from its saved `EndpointConfigName`; you run that schedule. The saving is the endpoint cost times the idle share.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-1611 |
| Category | schedule |
| Severity | medium |
| Metric | none — pure configuration read |
| Threshold | dev/test endpoint with measured idle share > 0 |
| Source | ZopNight |
| Permissions used | sagemaker:ListEndpoints · sagemaker:DescribeEndpoint · sagemaker:ListTags |
Where it applies
Endpoints cannot be stopped, only deleted
A real-time endpoint bills for its instances for as long as it exists. There is no stop button: AWS’s guidance is to delete endpoints to stop incurring charges, and the same page notes that deleting an endpoint does not delete its endpoint configuration or its model. That makes an off-hours pause possible. Delete the endpoint in the evening and create it again in the morning from the configuration you kept.
Checking an endpoint before scheduling it
aws sagemaker list-endpoints --status-equals InService \ --query 'Endpoints[].EndpointName' --output text
aws sagemaker describe-endpoint --endpoint-name dev-recs-endpoint \ --query '[EndpointStatus,EndpointConfigName,length(ProductionVariants)]'
aws sagemaker list-tags \ --resource-arn arn:aws:sagemaker:us-east-1:123456789012:endpoint/dev-recs-endpointWhich endpoints are considered
- It is a real-time endpoint in
InServicestatus. Asynchronous and serverless endpoints are out of scope: they already scale down when idle or bill per use. - It has exactly one production variant.
- Its name contains a dev or test marker such as
dev,test,qaorstaging, and neither its name nor its environment tag marks it as production. A dev tag on a neutral name is not enough. - It carries no schedule tag from another tool.
- It is billed on demand, not covered by a Savings Plan or reservation.
- ZopNight has a measured weekly pattern for it with an idle share above zero.
Why multi-variant endpoints are skipped
ZopNight’s usage pattern for an endpoint is built from its first production variant. On an A/B, blue/green or shadow endpoint, that variant can look idle while another serves live traffic, and deleting the whole endpoint would take that traffic down. Until usage is measured per variant, these endpoints never get a schedule recommendation. Endpoints with no measured idle share are skipped as well; the rule no longer assumes a fixed working week.
Idle share of the endpoint bill
saving = monthly endpoint cost x measured off-hours idle shareRunning the teardown on a schedule
- Take the start and stop times from the recommendation.
- Automate both ends, for example with an EventBridge schedule that calls a small Lambda function:
in the evening
aws sagemaker delete-endpoint --endpoint-name dev-recs-endpoint, and in the morningaws sagemaker create-endpoint --endpoint-name dev-recs-endpoint --endpoint-config-name dev-recs-config. - Keep the endpoint configuration and model; they are what the morning job recreates from.
- If traffic is sparse all day, not just at night, a serverless endpoint removes the need for any schedule.