AWS Certified Machine Learning – SpecialtyMachine Learning Implementation and OperationsEasy

A data science team has developed a new machine learning model for real-time anomaly detection. They need to deploy this model to production with minimal downtime and the ability to quickly roll back to the previous version if any issues are detected. Which deployment strategy should they implement to meet these requirements?

  1. AIn-place deployment, updating the model artifacts on the existing endpoint.
  2. BBlue/Green deployment, creating a new endpoint with the new model and shifting traffic.
  3. CShadow deployment, routing a copy of production traffic to the new model for observation.
  4. DCanary deployment, gradually shifting a small percentage of traffic to the new model.
Show answer & explanation

Correct answer: B. Blue/Green deployment, creating a new endpoint with the new model and shifting traffic.

Blue/Green deployment involves creating an entirely new, separate production environment (the 'Green' environment) for the new model version. Once the new environment is validated, traffic is switched from the old ('Blue') environment to the new one. This approach ensures minimal downtime and provides a fast rollback mechanism by simply switching traffic back to the 'Blue' environment if issues arise.

Why the other options are wrong

  • A. In-place deployment updates the existing endpoint, which can cause downtime and makes immediate rollback more complex.
  • C. Shadow deployment is for testing a new model with production traffic without impacting live users, not for immediate, low-downtime deployment with quick rollback.
  • D. Canary deployment gradually shifts traffic, which is good for testing but does not offer the immediate, full rollback capability of Blue/Green for critical, low-downtime scenarios.

Blue/Green Deployment

A deployment strategy where two identical production environments (Blue and Green) are maintained. One environment (Blue) serves live traffic, while the new version (Green) is deployed and validated. Once validated, traffic is switched to Green, and Blue becomes the standby or is retired.

  • Minimizes downtime during deployment.
  • Provides an immediate rollback mechanism.
  • Requires double the infrastructure during deployment.

Memory trick: Blue and Green: Two distinct paths, quick switch means no path is lost.

More Machine Learning Implementation and Operations questions