AWS guide automates auto scaling management when updating an Amazon SageMaker AI endpoint
AWS has described an AWS CDK construct that automatically deregisters and restores auto scaling when an Amazon SageMaker AI endpoint is updated. It uses custom AWS CloudFormation resources to enable configuration changes and scaling parameter changes to be deployed together.
AWS has published a guide on using AWS CDK to automate the deregistration and re-registration of auto scaling when updating an Amazon SageMaker AI endpoint. According to the company, the scaling target must be deregistered before the update. However, manual intervention can leave a deployment complete without auto scaling being restored. If scaling parameters are also changed, both the update and the rollback may fail, leaving a state that requires manual repair.
The construct described replaces two native AWS CloudFormation resources with three custom resources that handle deregistration, re-registration and the attachment of scaling policies. Calls to node.add_dependency enforce the order of operations. Registration waits for the InService state; asynchronous readiness checks repeat every 30 seconds. The timeout is one hour for target registration and 15 minutes for attaching scaling policies.
The ConfigHash property triggers the handler functions to run again when the configuration changes. Endpoint and auto scaling settings are therefore kept together in config/config.yaml. The deployed solution includes three custom resources, two AWS Step Functions state machines and twelve Lambda functions. Five functions contain the custom handler code for the construct, while the resource provider framework creates the other seven.
The guide offers both a sample deployment and instructions for integrating the construct into an existing AWS CDK project. The procedure includes changing the configuration, redeploying and verifying that auto scaling remains registered and uses the updated values. Details are available in the source article.
Why it matters
According to the article, a successful deployment following manual deregistration does not guarantee that auto scaling has been restored. The procedure described links the update to auto scaling restoration and readiness checks, which is particularly useful when configuration and scaling parameters change together.
Two audiences, two different impacts
What this means
For individuals
A developer managing infrastructure with AWS CDK can integrate the ready-made construct into an existing project and link configuration changes to the automatic restoration of auto scaling.
For a business
When assessing the solution, the operations team must account for the risk of auto scaling not being restored or a rollback failing, as well as the scope of the infrastructure being deployed: twelve Lambda functions and two AWS Step Functions state machines.
DevelopmentCheck the original
Event sources
only one source so far · 1 publisher, 0 independent. We count feeds from the same owner only once.