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.
feita há 2 anos204 visualizações
1 Resposta
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
ESPECIALISTA
Greg_B
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas