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년 전266회 조회
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년 전
profile picture
전문가
검토됨 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠