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
asked 2 years ago217 views
1 Answer
1
Accepted Answer

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
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions