-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lambda cold/warm start issue when DNS changes region #68
Comments
geralexgr
pushed a commit
to geralexgr/aws-health-aware
that referenced
this issue
Oct 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an issue in the code when the DNS is switching from one region to another.
We have noticed that when there is a failover from one region to another from the loadbalancer, although the health_active_region is changing, due to the fact that codeblock is not wrapped into a function or in the function handler, the code is not in warm state and wrong results are returned. Currently the initialisation of the config is done on the cold state. As a result when one runs the lambda every x minutes when a failover occurs it will return an error.
In the function logs we notice an error message like:
Client is configured with the deprecated endpoint: us-east-2
aws-health-aware/handler.py
Lines 24 to 38 in 6f047af
A solution for this issue could be to wrap the initialisations inside a function.
The text was updated successfully, but these errors were encountered: