What is AWSIOTDataPlaneBuilder?

0

Hi repost community,

I'm looking to populate AWS IOT core device shadow in a lambda function. I'm looking to use Device Shadow REST API. After looking around, it looks like I need to add "Authorization" header myself. Then I looked into documentation which suggested me to look into AWS SDK. Finally I found AWSIOTDataPlaneBuilder which does have a bunch of shadow methods I need. But there's no documentations or example for this.

  1. So what is AWSIOTDataPlaneBuilder? Is this supposed to be used?
  2. if not, is any example for REST API calling to device shadow(from cloud with auth header)? All I found is MQTT examples.
Xicheng
preguntada hace 2 años232 visualizaciones
1 Respuesta
1
Respuesta aceptada

Hi,

when using a Lambda function to update the thing shadow you need to add permission to the Lambda execution role to update the thing shadow: "Action": "iot:UpdateThingShadow".

When you use an AWS SDK to interact with the thing shadow you don't need to add an authorization header. You call the UpdateThingShadow API with the language of your choice. Assuming you are using Java because you mention AWSIOTDataPlaneBuilder the UpdateShadow method is documented at https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/iotdata/AWSIotData.html.

AWS IoT Core provides a control plane and a data plane. The control plane is used to create/update/delete your IoT resources like things, policies, rules, etc. The data plane is used for data in your case sending data to the thing shadow.

Cheers,

Philipp

AWS
EXPERTO
respondido hace 2 años

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