Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

AWS CDK Construct Simplifies SageMaker AI Endpoint Autoscaling Updates

AI summary

AWS Machine Learning Blog documents deployment failures when CloudFormation or AWS CDK updates a SageMaker AI real-time endpoint while Application Auto Scaling remains registered. It presents a reusable CDK construct that uses three custom resources to deregister and re-register autoscaling with explicit dependency ordering, allowing endpoint configuration and scaling parameters to be updated in one deployment.

In-depth insight

The vendor-provided construct addresses a reproducible infrastructure-management problem that can otherwise leave endpoints without autoscaling or CloudFormation stacks requiring manual recovery.

Updating the Amazon Sagemaker AI real-time endpoint configuration (changing the instance type, instance count, or environment variables) causes deployments through AWS CloudFormation or the AWS Cloud Development Kit (AWS CDK) to fail. SageMaker AI requires you to deregister the scalable target before updating the endpoint, but when you deregister it, CloudFormation can’t track the AWS Application Auto Scaling resources.

In this post, we show you how to use a reusable CDK construct with AWS CloudFormation custom resources to orchestrate deregister and register auto scaling automatically during endpoint updates. You can update your endpoint configuration and auto scaling parameters in a single deployment without manual intervention.

Why this problem occurs

When you deploy a SageMaker AI endpoint with native CloudFormation auto scaling resources, then change the endpoint configuration and redeploy, several failure modes emerge. The specific failure depends on what you change and how you work around the issue.

Changing the endpoint configuration with auto scaling registered

CloudFormation tries to update the endpoint while the scalable target is still registered. SageMaker AI rejects the update with the following error:

#Amazon SageMaker AI#AWS CDK#AWS CloudFormation#AWS Application Auto Scaling

Original · 8 min readRead the original
Group chat

No comments yet. Start the conversation.