12 lines
311 B
Python
12 lines
311 B
Python
import json
|
|
import boto3
|
|
def lambda_handler(event):
|
|
|
|
percent = event["queryStringParameters"]["percent"]
|
|
client = boto3.client('iot-data')
|
|
client.publish(topic="arduino/incoming", qos=1, payload=percent)
|
|
return {
|
|
'statusCode': 200,
|
|
'body': json.dumps('Hello from Lambda!')
|
|
}
|