How DefaultAWSCredentialsProviderChain refresh the aws client token?

0

I am creating AmazonS3Client using DefaultAWSCredentialsProviderChain. Inside this, I have used WebIdentityTokenCredentialsProvider which is internally calling STSProfileCredentialsServiceLoader. My question is, in the case when the token is refreshed, how AmazonS3Client automatically get to know about it and uses the new credentials? Once the bean(AmazonS3Client) is created, how the tokens are refreshed and reflected back to the already instantiated bean? Is there any implementation that is modifying the AmazonS3Client? I am unable to get the code flow between AmazonS3Client and AWSCredentialsProvider. Can someone help me to understand that?

Also is there any way to achieve the same(DefaultAWSCredentialsProviderChain) using any custom implementation while creating AWSIotMqttClient bean?

I am using java-spring-boot for building the application.

没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则