-
Notifications
You must be signed in to change notification settings - Fork 700
fix: cache GitHub App ID to reduce SSM calls #4994
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
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Cache the GitHub App ID at module level to avoid repeated SSM parameter fetches on every rate limit metric update. The value is now fetched once per Lambda execution context and reused across invocations.
7483a9d to
60eccce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation is solid and ready to merge from my perspective.
We should consider how this relates to the broader caching work in PR #4899, these may want to be coordinated.
This change is very low-risk and provides a clear performance benefit for high-volume environments. Work from #4899 can probably wait and be added later integrating this cache into the broader caching work.
There probably isn't any issues, but I will run some tests on our environment and come back to approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing showed lower number of calls to the getParameter function which resulted in lower lambda duration, from eventual timeouts to a max of 55s for 50 runners batch creation. System seemed more responsive since no orphan runners were created.
🤖 I have created a release *beep* *boop* --- ## [7.3.0](v7.2.0...v7.3.0) (2026-01-13) ### Features * add bypass-removal tag to prevent runner scale-down ([#4995](#4995)) ([c0a9766](c0a9766)) ### Bug Fixes * cache GitHub App ID to reduce SSM calls ([#4994](#4994)) ([0fb6f4a](0fb6f4a)) * change runner_placement host_resource_group_arn type to be a string instead of a number ([#4979](#4979)) ([5405a04](5405a04)) * **lambda:** bump the aws group in /lambdas with 7 updates ([#4985](#4985)) ([5eacb0f](5eacb0f)) * **runners:** correct regex pattern for extracting AMI ID from SSM parameter ARN ([#4981](#4981)) ([174293c](174293c)), closes [#4959](#4959) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com> Co-authored-by: github-aws-runners-pr|bot <github-aws-runners-pr[bot]@users.noreply.github.com>
Cache the GitHub App ID at module level to avoid repeated SSM parameter fetches on every rate limit metric update. The value is now fetched once per Lambda execution context and reused across invocations.
Especially when multiple events are badged, repeatedly calling the SSM Parameter API feels wasteful and adds a non-negligible amount of latency to several functions in the scale-up Lambda.