SIGN IN SIGN UP
laravel / framework UNCLAIMED

Laravel is a web application framework with expressive, elegant syntax.

0 0 135 PHP

[13.x] Memoize credentials in SqsConnector (#59866)

When a queue config sets `credentials.provider = ecs` (or `instance`),
SqsConnector::resolveCredentialProvider returned a raw EcsCredentialProvider
or InstanceProfileProvider. The AWS SDK's ClientResolver short-circuits any
callable passed as `credentials` (no automatic memoize wrap), and the signer
middleware invokes the provider on every signed request — so every SQS API
call triggered a fresh HTTP fetch to the EKS Pod Identity Agent / EC2
metadata endpoint.

Wrap the resolved provider in CredentialProvider::memoize so credentials are
cached in-process for the lifetime of the worker, with the SDK's standard
60-second pre-expiry refresh window. This matches what the SDK's own
defaultProvider() does and stops queue workers from saturating the Pod
Identity Agent's rate limiter under steady-state polling.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
K
Kieran Brown committed
98e99685580dd74b0f0587eb14367492d8a4caad
Parent: 2457caf
Committed by GitHub <noreply@github.com> on 4/26/2026, 4:36:27 PM