Oriel — AI & technology worth noticing, every day.

Orchestrating SageMaker AI endpoint auto scaling with AWS CDK

Web page · https://aws.amazon.com/blogs/machine-learning/orchestrating-sagemaker-ai-endpoint-auto-scaling-with-aws-cdk

Updating a SageMaker AI endpoint that has Application Auto Scaling registered makes AWS CloudFormation and AWS CDK deployments fail. This post shows how to build a reusable AWS CDK construct with CloudFormation custom resources that deregisters and re-registers auto scaling automatically, so you can update the endpoint and its scaling in a single deployment.

First seen by Oriel on .

AI summary

The post presents a reusable AWS CDK construct that coordinates SageMaker AI endpoint updates with Application Auto Scaling, allowing endpoint and scaling configuration changes in one deployment.

  • Three CloudFormation custom resources deregister scaling before the endpoint update, then register the scalable target and attach its policy afterward.
  • Asynchronous CDK providers wait for the endpoint to reach InService and the target to become queryable, with timeouts of one hour and 15 minutes.
  • A shared ConfigHash triggers the orchestration when endpoint or scaling settings change; explicit CDK dependencies enforce the operation order.
  • The deployed stack includes three custom resources, two Step Functions state machines, and twelve Lambda functions, including provider-generated helpers.
  • The sample requires AWS CDK v2, Python 3.12 or later, uv, AWS permissions, and a model artifact and container image or built-in algorithm container.

#aws cdk #sagemaker #application auto scaling #cloudformation

Generated by gpt-5.6-sol. Check the original for details.

Aliases

SourceExternal IDURL
AWS Machine Learning Blog99e1f40843e42eddcc6ecfc9f758bee6b1d7c9a3https://aws.amazon.com/blogs/machine-learning/orchestrating-sagemaker-ai-endpoint-auto-scaling-with-aws-cdk/ Read discussion