Description
I stumbled across an issue during the last DST change of 2023, that I believe may be related to how this package determines the expiry moment for its credentials, or potentially the caching strategy around it.
We witnessed several K8s pods crashing the hour after the clocks went back by an hour in 2023, with the error message thrown by this package; The security token included in the request is expired
.
It's my hypothesis that this might have happened because the expiry moment was determined prior to the DST-change moment, and that timezone information might be mishandled.
We also use the official AWS PHP SDK in the same application, and code using this package was unaffected.
The main difference I can spot between this package and the official AWS PHP SDK is that the latter converts the expiry moment to a Unix timestamp pretty early on and does its comparison against that. Whilst async-aws/core
creates and uses a DateTimeImmutable
for this.
Additional information;
- We're in the
Europe/London
timezone. - We use the WebIdentity (K8s pod IAM web session identity) credential provider.