{"id":17481,"date":"2025-06-12T12:47:49","date_gmt":"2025-06-12T12:47:49","guid":{"rendered":"https:\/\/gaviki.com\/blog\/?p=17481"},"modified":"2025-06-12T12:47:52","modified_gmt":"2025-06-12T12:47:52","slug":"a-data-engineer-needs-to-ingest-messages-from-devices-that-publish-messages-to-a-lighting-topic-and-to-a-heating-topic","status":"publish","type":"post","link":"https:\/\/gaviki.com\/blog\/a-data-engineer-needs-to-ingest-messages-from-devices-that-publish-messages-to-a-lighting-topic-and-to-a-heating-topic\/","title":{"rendered":"A data engineer needs to ingest messages from devices that publish messages to a &#8220;lighting&#8221; topic and to a &#8220;heating&#8221; topic"},"content":{"rendered":"\n<p>A data engineer needs to ingest messages from devices that publish messages to a &#8220;lighting&#8221; topic and to a &#8220;heating&#8221; topic. Which AWS IoT Core configuration might they use to store lighting data for weekly reporting?<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong>The correct answer and explanation is:<\/strong><\/mark><\/p>\n\n\n\n<p><strong>Correct Answer:<\/strong><br><strong>Create an AWS IoT rule that writes data from the &#8220;lighting&#8221; topic to an Amazon S3 bucket.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Explanation (300 words):<\/strong><\/p>\n\n\n\n<p>AWS IoT Core enables devices to publish messages to MQTT topics. To process or store these messages, you can create <strong>IoT rules<\/strong>, which are powerful mechanisms for filtering and routing data from topics to other AWS services.<\/p>\n\n\n\n<p>In this case, the data engineer wants to ingest messages from devices that publish to <strong>&#8220;lighting&#8221;<\/strong> and <strong>&#8220;heating&#8221;<\/strong> topics, with a specific need to <strong>store lighting data<\/strong> for <strong>weekly reporting<\/strong>. Since reporting often involves aggregation and analysis of structured or semi-structured data, the best destination is typically <strong>Amazon S3<\/strong>, which is a durable, scalable, and cost-effective object storage service well-suited for analytics workloads.<\/p>\n\n\n\n<p>To achieve this, the engineer would:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create an AWS IoT rule<\/strong> that triggers when a message is published to the <code>\"lighting\"<\/code> topic.<\/li>\n\n\n\n<li>Use an <strong>SQL-based rule query statement<\/strong> like: <code>SELECT * FROM 'lighting'<\/code> This filters the messages coming only from the <code>\"lighting\"<\/code> topic.<\/li>\n\n\n\n<li><strong>Set the rule action<\/strong> to send the incoming message to <strong>Amazon S3<\/strong>. The rule will need:\n<ul class=\"wp-block-list\">\n<li>An S3 bucket configured to receive the data.<\/li>\n\n\n\n<li>A proper IAM role that grants permission to write to the bucket.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Storing messages in S3 allows integration with reporting and analytics tools such as Amazon Athena, AWS Glue, and Amazon QuickSight. Weekly reports can be generated by querying this S3-stored data on a schedule.<\/p>\n\n\n\n<p>This configuration separates the concerns: the <strong>IoT Core rule<\/strong> handles message ingestion and filtering, while <strong>Amazon S3<\/strong> stores data durably and cost-effectively for downstream analytics.<\/p>\n\n\n\n<p>Meanwhile, a similar rule could be created for the <code>\"heating\"<\/code> topic, if necessary, targeting a different destination or processing logic.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A data engineer needs to ingest messages from devices that publish messages to a &#8220;lighting&#8221; topic and to a &#8220;heating&#8221; topic. Which AWS IoT Core configuration might they use to store lighting data for weekly reporting? The correct answer and explanation is: Correct Answer:Create an AWS IoT rule that writes data from the &#8220;lighting&#8221; topic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17481","post","type-post","status-publish","format-standard","hentry","category-quiz-questions"],"_links":{"self":[{"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/posts\/17481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/comments?post=17481"}],"version-history":[{"count":1,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/posts\/17481\/revisions"}],"predecessor-version":[{"id":17483,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/posts\/17481\/revisions\/17483"}],"wp:attachment":[{"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/media?parent=17481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/categories?post=17481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gaviki.com\/blog\/wp-json\/wp\/v2\/tags?post=17481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}