TopicRule
Source:
src/AWS/IoT/TopicRule.ts
An AWS IoT topic rule — evaluates an SQL statement against messages published to MQTT topics and routes matching messages to one or more actions (invoke a Lambda, enqueue to SQS, republish, etc.).
Creating a Rule
Section titled “Creating a Rule”const rule = yield* TopicRule("ingest", { sql: "SELECT * FROM 'sensors/+/telemetry'", actions: [{ lambda: { functionArn: yield* fn.functionArn } }],});