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
已提问 2 年前232 查看次数
1 回答
1
已接受的回答

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
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则