def lambda_handler()

in aws-iot-greengrass-for-beginners/lambda/lambda_function.py [0:0]


def lambda_handler(event, context):
    logging.info(event)
    if float(event["value"]) > float(VALUE):
        client.publish(
            topic="alert/world",
            payload=json.dumps({"status": "alert", "value": event["value"]})
        )
        logging.warning("published alert")