A real-time endpoint answers InvokeEndpoint calls in milliseconds because it keeps instances running continuously. That is also its cost story - those instances bill hourly whether traffic is heavy, light, or absent.
Auto scaling is how you reconcile the two: keep enough instances up to meet latency under load, without paying for peak capacity around the clock. SageMaker doesn't scale endpoints itself - it hands that job to Application Auto Scaling, a separate AWS service that watches a metric and adjusts InstanceCount on your behalf.
The scalable target and the endpoint are two different resources tracked by two different services - checking both confirms the wiring is correct.
CurrentInstanceCount on DescribeEndpoint reflects what auto scaling has actually provisioned, which can differ from InitialInstanceCount once scaling has acted.
Nothing here tells you whether the target value (70 invocations/instance) is well-tuned - that comes from watching real traffic and CloudWatch metrics over time.
A scaling action itself takes a few minutes to add or remove instances - it is not instantaneous.
SageMaker endpoints don't scale themselves - Application Auto Scaling is a shared AWS service that also scales DynamoDB tables, ECS services, and other resources, using the same RegisterScalableTarget/PutScalingPolicy calls with a different ServiceNamespace and ScalableDimension. For SageMaker, the resource is identified as endpoint/<endpoint-name>/variant/<variant-name>, and the dimension is sagemaker:variant:DesiredInstanceCount. This is why scaling logic lives in a different client than the one used to create the endpoint.
TargetTrackingScaling is the simplest policy type: pick a metric and a target value, and Application Auto Scaling adds or removes instances to keep the metric near that target. SageMakerVariantInvocationsPerInstance is the predefined metric built for this - it normalizes traffic per instance, so the target value represents "how many requests per instance per minute is comfortable," not a raw endpoint-wide number.
A step scaling policy exists as an alternative, defining explicit scaling adjustments per CloudWatch alarm threshold. It gives finer control but requires you to manage alarms and step adjustments directly rather than a single target value - most endpoints don't need that complexity.
ScaleOutCooldown and ScaleInCooldown control how long Application Auto Scaling waits after a scaling action before considering another one. Scaling out (adding instances) typically uses a short cooldown to react quickly to a traffic spike and protect latency; scaling in (removing instances) typically uses a longer one, since removing capacity too eagerly risks a scale-out/scale-in flap under bursty-but-not-sustained traffic.
MinCapacity guarantees a floor - the endpoint will never scale below it, which matters if a cold instance start would violate a latency requirement on the next request. MaxCapacity is a cost ceiling: however aggressive the metric or however heavy real traffic gets, the endpoint will not provision more instances than this, which caps worst-case billing at the price of a possible latency degradation under extreme load.
Registering the scalable target against the wrong ResourceId format. It must be exactly endpoint/<endpoint-name>/variant/<variant-name>, matching the VariantName set in CreateEndpointConfig. Fix: copy the variant name directly from the endpoint config rather than assuming "AllTraffic" everywhere.
Setting MinCapacity to 0. A real-time endpoint's variant cannot scale to zero instances - MinCapacity must be at least 1. Fix: use serverless inference if you need true scale-to-zero behavior.
Expecting instant scaling. A target-tracking policy reacts to sustained metric pressure, not an instantaneous spike - it can take minutes to provision new instances. Fix: size MinCapacity to absorb a typical burst before scaling has time to react.
Tuning TargetValue without real traffic data. A target picked before seeing production load is a guess. Fix: start conservative, then adjust the target value based on observed SageMakerVariantInvocationsPerInstance and latency together.
Forgetting the policy is per-variant. A multi-variant endpoint (e.g. for canary testing) needs a separate scalable target and policy per variant. Fix: register and tune each VariantName independently.
Does SageMaker scale real-time endpoints on its own?
No. Scaling a real-time endpoint's instance count requires registering it with Application Auto Scaling and attaching a scaling policy - without that, InstanceCount stays fixed at whatever CreateEndpointConfig set.
What metric should a first scaling policy use?
SageMakerVariantInvocationsPerInstance, the predefined metric built for SageMaker endpoints. It's the standard starting point before considering a custom or step-scaling policy.
Can a real-time endpoint scale to zero instances?
No - MinCapacity must be at least 1 for a real-time variant. Serverless inference is the option built for true scale-to-zero behavior.
Why is scale-in slower than scale-out by default?
To avoid flapping. A short ScaleOutCooldown protects latency during a spike; a longer ScaleInCooldown avoids removing capacity too eagerly if traffic is only briefly quiet.
Does changing the scaling policy require a new EndpointConfig?
No. Auto scaling adjusts InstanceCount on the running endpoint directly - it doesn't touch the EndpointConfig resource or require redeploying the endpoint.