You first create an IAM Role which is used by AWS IoT Core to call the Lambda function and pass the device message for processing.
-
Login to your AWS Account and choose Ireland as the AWS region.
-
Goto the IAM Management Console. Click on the Roles menu item in the left and then click on the Create role button.
-
Select IoT as the AWS Service. Click the Next: Permissions button.
-
On the next screen, click on the Next: Tags button.
-
On the next screen, click on the Next: Review button.
-
On the next screen, enter the Role name as dojoiotrole and click on the Create role button.
-
The role is created in no time. Open the dojoiotrole details and add AWSLambdaRole policy for the permissions along with the existing three policies.
-
You can now move to the next task which will register the device as the thing in the AWS IoT Core.