Skip to content

Conversation

@norbert
Copy link
Contributor

@norbert norbert commented Dec 11, 2025

Right now the ASG Lambda function will always change the routes to the NAT Gateway, when it should only change the routes away from the EC2 instance being terminated.

While there might be some conditions that can lead to severely delayed execution, it doesn't seem to be much of a problem in practice. More importantly, though, the current behavior is wrong when a new instance launches before the function runs as with #167.

There is still an unavoidable race condition between the DescribeRouteTables and ReplaceRoute API calls. When everything is normal there shouldn't be multiple processes changing the route tables concurrently, and in the worst case the current behavior still wins out.

@norbert norbert force-pushed the lambda-asg-route-overwrites branch from a18e668 to b4c8b0e Compare December 18, 2025 16:41
@norbert norbert marked this pull request as ready for review December 18, 2025 18:34
@norbert norbert requested review from a team and bwhaley as code owners December 18, 2025 18:34
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.

1 participant