Professional Documents
Culture Documents
Extended AWS IoT Connection
Extended AWS IoT Connection
Part – A
1.Here temperature sensor had taken for this simple Aws with Lamda connection
2.The values from sensor build the directed to the data server using Aws with Lamda
Part –B
import boto3
import datetime
import time
import math
import json
iot_client=boto3.client('iot-data')
topic = "TempCheckerTopic"
i=0
i += 1
now = datetime.datetime.now()
payload = json.dumps({"Iterator": i,
"Temperature": temperature,
"Timestamp": now.timestamp()})
iot_client.publish(topic=topic, payload=payload)
time.sleep(1)
return {
'statusCode': 200
Part – C