Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 3, 2025

Summary

Fixes critical availability issue in appointment-service-get Lambda function that was causing 50% error rate.

Changes

1. Fixed Lambda Code

File: lambda-petclinic/sample-apps/function3-different-version/lambda_function.py

  • Removed hardcoded exception trigger at line 26-27 that was causing NullPointerException
  • Also fixed typo in error message (line 30)

2. Route Traffic to Stable Version

File: lambda-petclinic/cdk/lib/lambda-petclinic-stack.ts

  • Changed alternateVersionWeight from 0.5 to 0 (line 208)
  • Routes 100% traffic to stable v1 version instead of 50/50 split

Root Cause

The buggy alternate version contained intentional failure code:

if pet_id == "111111111111":
    raise Exception('Fail to parse the request. Cause: NullPointerException')

With 50% traffic split, this caused 50% error rate (3,148 errors in 24h period).

Impact

  • Eliminates 50% error rate in appointment-service-get Lambda
  • Resolves NullPointerException errors
  • Restores 100% availability for appointment queries

🤖 Generated by Application observability for AWS

Remove hardcoded exception trigger that was causing 50% error rate in the alternate version deployed to appointment-service-get Lambda function.
Set alternateVersionWeight to 0 to route all traffic to the stable v1 version of appointment-service-get Lambda function, eliminating the 50% error rate caused by the buggy alternate version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants