HomeInterview QuestionsExplain blue/green deployment with traffic shiftin…

Explain blue/green deployment with traffic shifting in AWS Lambda.

🟡 Medium Conceptual Junior level
1Times asked
Jul 2026Last seen
Jul 2026First seen

💡 Model Answer

Blue/green deployment is a release strategy that keeps two identical production environments—Blue (current) and Green (new). For AWS Lambda, you create a new version or alias for the updated function (Green) while the existing version (Blue) continues to serve traffic. Traffic shifting is the gradual or instant transfer of request load from Blue to Green. This can be achieved using API Gateway stage variables, ALB target groups, or Lambda aliases with weighted routing. The process typically involves:

  1. Deploy the new Lambda version and create an alias pointing to it.
  2. Update the routing configuration to route a small percentage of traffic to the Green alias.
  3. Monitor metrics (latency, errors) and logs. If healthy, increase the weight until 100% traffic is on Green.
  4. Once fully shifted, decommission the old Blue version.

Benefits include zero downtime, easy rollback by reverting the alias weight, and the ability to validate the new code under real traffic. It also supports canary releases and A/B testing. In practice, many teams use Lambda aliases with weighted routing and CloudWatch alarms to automate the shift.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500