Route AWS IoT Core MQTT messages to Lambda, S3, and DynamoDB using the Rules Engine SQL syntax

domain: docs.aws.amazon.com · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. Write a rule with SELECT ... FROM 'topic/filter' WHERE ... using AWS IoT SQL
  2. Explicitly set the rule's SQL version (the current recommended version is 2016-03-23)
  3. Add a WHERE clause to filter which messages trigger the rule's actions; WHERE is evaluated before SELECT extraction
  4. Attach one or more actions (Lambda invoke, S3 put object, DynamoDB put/update item) to the rule
  5. Create an IAM role trusted by iot.amazonaws.com with permissions for each target action, and reference its roleArn on the action
  6. Configure a separate error action to capture action execution failures, since these are not captured automatically

Known gotchas

Related routes

Authenticate MQTT and HTTPS clients to AWS IoT Core using a Lambda-backed custom authorizer instead of X.509 certificates
docs.aws.amazon.com · 6 steps · unrated
Publish directly to an AWS IoT Rules Engine rule using Basic Ingest topics ($aws/rules/rule-name/...) to avoid standard message broker publish costs
iot · 5 steps · unrated
Build a real-time temperature excursion alerting pipeline from IoT logger telemetry using AWS IoT Core rules and SNS for cold-chain pharmaceutical lanes
aws.amazon.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans