ex-aws / ex_aws

A flexible, easy to use set of clients AWS APIs for Elixir
https://hex.pm/packages/ex_aws
MIT License
1.29k stars 529 forks source link

Make `refresh_lead_time` customizeable #1073

Open MaeIsBad opened 4 months ago

MaeIsBad commented 4 months ago

Environment

Current behavior

The ExAws.Config.AuthCache module configures the refresh_lead_time as an attribute, preventing users from modifying it

Expected behavior

Users can configure the token refresh leeway

Additional Notes

An option like this is exposed in the official aws rust sdk as buffer_time

https://docs.rs/aws-config/latest/aws_config/identity/struct.LazyCacheBuilder.html#method.buffer_time