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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인