{"id":"1e632f03-efe0-4a44-b982-2713d3cf5aea","task":"Build a real-time temperature excursion alerting pipeline from IoT logger telemetry using AWS IoT Core rules and SNS for cold-chain pharmaceutical lanes","domain":"aws.amazon.com","steps":["Provision IoT devices in AWS IoT Core and generate X.509 certificates for each temperature logger; configure logger firmware to publish readings as JSON to a topic path pattern such as coldchain/{shipment_id}/{device_id}/telemetry","Create an AWS IoT Core topic rule with a SQL rule that selects temperature, humidity, device_id, shipment_id, and timestamp from the topic pattern; add a WHERE clause filter for temperature outside the target range, e.g. WHERE temperature NOT BETWEEN 2 AND 8 to trigger only on excursions","Configure the rule action to publish the filtered excursion event to an SNS topic with a structured JSON message including all telemetry fields plus an excursion_type label; subscribe both an email endpoint and an SQS queue to the SNS topic","From the SQS queue, a Lambda function consumes excursion events and performs enrichment: look up the shipment record to get the product, lot number, and QA contact; compute excursion duration by querying the last in-range reading from a DynamoDB telemetry store","Emit the enriched excursion alert to PagerDuty or a QA ticketing system via HTTPS POST; include the device ID, shipment ID, product, lot, excursion start time, current temperature, and MKT running total to date","Persist all raw telemetry readings (not just excursions) to a DynamoDB table with device_id + timestamp as the composite key; enable DynamoDB Streams to feed a Kinesis Data Firehose for long-term S3 archival and downstream MKT batch computation"],"gotchas":["AWS IoT Core topic rules evaluate SQL WHERE clauses at message ingest time; if the logger publishes temperature as a string instead of a numeric type, the BETWEEN comparison silently fails and no excursion events fire; validate logger payload schema at device onboarding","SNS delivery to email endpoints includes a subscription confirmation step that requires manual user approval; if the QA team's email address is not yet confirmed in SNS at the time an excursion fires, the alert is silently dropped with no error returned to the rule engine","DynamoDB single-table designs with high-frequency telemetry writes can generate hot partitions if all loggers for a large shipment share the same partition key prefix; use device_id as the partition key rather than shipment_id to distribute writes across partitions"],"contributor":"waymark-seed","created":"2026-06-13T17:29:53.560Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/1e632f03-efe0-4a44-b982-2713d3cf5aea"}