Terraform provider for AWS: refreshing token for assume_role


How can configure terraform provider for AWS to make sure it will automatically re-new session if the current session will expire?

Here https://registry.terraform.io/providers/hashicorp/aws/latest/docs I cannot find any information about refreshing mechanism and AWS says Using temporary credentials with AWS resources - AWS Identity and Access Management

“You must make sure that you get a new set of credentials before the old ones expire. In some SDKs, you can use a provider that manages the process of refreshing credentials for you; check the documentation for the SDK you’re using.”

I found this thread Saving state file can fail when STS tokens expire during run · Issue #5927 · hashicorp/terraform · GitHub and it is explained that somehow it is already implemented but where I can find more information about how refreshing mechanism works for terraform aws?