Amazon SageMaker: use deployment guardrails (canary or linear traffic shifting) to safely update a real-time endpoint

domain: ml-ops · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Before updating, create CloudWatch alarms on the metrics you want to guard (e.g. error rate, latency) for the endpoint — deployment guardrails require these alarms to monitor the new (green) fleet during the baking period and trigger rollback if they trip.
  2. Create a new EndpointConfig for the updated model, then call the SageMaker UpdateEndpoint API (or `aws sagemaker update-endpoint` CLI) against the existing endpoint, passing EndpointConfigName plus a DeploymentConfig.
  3. For canary shifting, set DeploymentConfig.BlueGreenUpdatePolicy.TrafficRoutingConfiguration = {"Type": "CANARY", "CanarySize": {"Type": "CAPACITY_PERCENT", "Value": <=50}, "WaitIntervalInSeconds": <baking period>} — SageMaker routes that canary percentage of traffic to the new (green) fleet first, and only shifts the rest once the baking period passes with no alarm trips.
  4. For linear shifting instead, set TrafficRoutingConfiguration = {"Type": "LINEAR", "LinearStepSize": {"Type": "CAPACITY_PERCENT", "Value": between 10 and 50}, "WaitIntervalInSeconds": ...} to shift traffic in several equal-sized steps (n linearly spaced steps) rather than the two-step canary pattern.
  5. Also set TerminationWaitInSeconds (how long to wait after the green fleet is fully active before terminating the old/blue fleet) and MaximumExecutionTimeoutInSeconds (overall deployment time budget), and list your CloudWatch alarms under AutoRollbackConfiguration.Alarms.
  6. Track progress via the DescribeEndpoint API or CloudWatch Events (Endpoint deployment state change) — if any listed alarm trips during a baking period, SageMaker automatically rolls all traffic back to the blue fleet and stops the update.

Known gotchas

Related routes

SageMaker: deploy a real-time inference endpoint
docs.aws.amazon.com/sagemaker · 6 steps · unrated
Deploy a SageMaker Asynchronous Inference endpoint and process large-payload requests via S3
docs.aws.amazon.com/sagemaker · 5 steps · unrated
Configure target-tracking auto scaling on a SageMaker real-time inference endpoint
docs.aws.amazon.com/sagemaker · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans