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.
preguntada hace 2 años267 visualizaciones
1 Respuesta
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
EXPERTO
Greg_B
respondido hace 2 años
profile picture
EXPERTO
revisado hace 4 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas