AWS has published a reusable Cloud Development Kit construct for updating SageMaker real-time endpoints without breaking their Application Auto Scaling configuration.
SageMaker requires a scalable target to be deregistered before an endpoint’s instance type, count or environment can change. A normal CloudFormation deployment attempts the endpoint update while scaling is still attached and fails. Manually deregistering the target can create a subtler problem: CloudFormation may complete the endpoint change without restoring scaling, or enter a failed rollback if its template still expects a deleted resource.
The sample replaces native scaling resources with three ordered custom resources. One removes the scalable target, the CDK-managed endpoint updates, a second waits for the endpoint to reach InService and registers the target, and a third waits until that target is queryable before attaching the policy. A configuration hash forces the sequence to run whenever endpoint or scaling values change.
The convenience has an infrastructure cost. The design deploys three custom resources, two Step Functions state machines and 12 Lambda functions, including framework-generated handlers. Teams must account for those components, permissions and failure modes. The sample is most useful where repeatable infrastructure deployments matter more than minimizing resource count, and operators should still verify after every update that both the endpoint and scaling policy are active.