AWS Iot v1 updateCredentials API alternative

0

In v1 SDK for java we uses mqttClient updateCredentials API to refresh the credentials post expiration, But in V2 sdk we dont have UpdateCredentials API, so we did manual disconnect and used refreshed AwsSessionCredentials to create a new mqttClient and maps it to the old MQttWrapper. For creating the new client we uses AwsIotMqttConenctionBuilder which takes CredentialsProvider.

Questions.

  1. Does the V2 SDK supports automatic refresh of AWSSessionCredentials or do we need to manually do it.
  2. If we need to do it manually Is there any way other than manual disconnect and connect again.
  3. As the manual disconnect and connect can cause intermittent issues and Latency issue do we have any other alternative for it.
已提问 2 年前203 查看次数
1 回答
0

Hi. The V2 IoT Device SDKs are all built on top of the AWS Common Runtime. The aws-c-auth module handles the credentials provider. The provider chains that source session credentials handle refreshing internally.

For instance, you can see the setup of the refreshing here: https://github.com/awslabs/aws-c-auth/blob/5c2d39e69a39eeead2f1e1508cd02d45d8921cc1/source/credentials_provider_default_chain.c#L376

profile pictureAWS
专家
Greg_B
已回答 2 年前

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

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

回答问题的准则