AWS IoT Core Configuration

To receive data from the automatic sensor source, we need to configure AWS IoT Core.
Access the AWS IoT Core management console.

  1. Create Thing
  • Select Thing
  • Click on Create thing

S3

  • In the Number of thing to create section
  • Select Create single thing
  • Click Next

S3

  • When the Specify thing properties section appears
  • In the Thing name field, enter InventorySensor
  • Click Next

S3

  • In the Device certificate section, select Auto-generate a new certificate
  • Click Next

S3

  • Click create thing
  • Download the files in the Download certificates and key table to your device

S3

  1. Create policies
  • In the Security section, select Policies

  • Choose Create policy
    S3

  • In Policy name, enter IoTInventoryPolicy

  • In Policy action:

  • Select iot:Connect

  • Select iot:Publish

  • Select iot:Subscribe

  • Select iot:Receive

  • In Policy resource, enter arn:aws:sns:us-east-1:922456364996:InventoryAlerts
    S3

  • Select Certificates

  • Click on the Certificates of the project

  • Choose Action and select Attach policy

S3

  • In Policies, select IoTInventoryPolicy
  • Choose Attach policies

S3

  • Continue by selecting Attach to things

S3

  • In Things, select InventorySensor1
  • Choose Attach to thing

S3

  1. Create a rule
  • Select Message routing
  • Select Rule
  • Select Create rule

S3

  • In Rule name, enter InventoryRule
  • Select Next

S3

  • In SQL statement, enter SELECT * FROM ‘inventory/sensor1/data’
  • Select Next

S3

  • In Action1, select Lambda
  • In Lambda function, select ProcessInventoryData
  • In Lambda function version, select $LATEST
  • Select Next

S3

  • Select Create

S3