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.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions