Orchestrating SageMaker AI Endpoint Auto Scaling with CDK
- Changing a SageMaker AI real-time endpoint configuration can fail through CloudFormation or CDK when its Application Auto Scaling scalable target is still registered.
- If the target is removed manually and only the endpoint configuration changes, deployment may succeed but leave the endpoint without auto scaling.
- After manual target removal, changing scaling settings can make CloudFormation attempt to update a missing resource, and its rollback may also fail, requiring manual recovery.
- The reusable CDK construct replaces native scaling resources with custom resources that remove the target, update the endpoint, then register the target and apply its policy in order.
- A ConfigHash change triggers the orchestration when endpoint or scaling settings change; asynchronous handlers wait for the endpoint and scalable target to become ready.
Our take
Compared with native CloudFormation ScalableTarget and ScalingPolicy resources, this construct controls update ordering through custom resources but expands the deployed stack. The example includes 12 Lambda functions and 2 Step Functions state machines, so teams should account for the provider-generated components when reviewing deployment resources; actual costs depend on usage.
Sources
- Orchestrating SageMaker AI endpoint auto scaling with AWS CDK · AWS Machine Learning
The summary and analysis were generated by AI. The original sources are authoritative. AI content policy