Predicting Container Usage by Region and Product - AWS Certified Machine Learning Exam MLS-C01

Create AWS Pipeline for Inference Requests to Linear Learner Model

Question

You work for a farming equipment component manufacturer which builds farm product containers like corn silos, milk containers, etc.

These containers have IoT sensors built into them that transmit information such as fill rate, capacity usage, etc.

The IoT devices transmit their data back to your cloud environment via the MQTT protocol.

You want to use a machine learning model to predict container usage by region and by product stored.

This information will help your management team use real-time dashboards to better understand their product marketing campaigns by region.

You have created, trained, and deployed to Amazon SageMaker Hosting Services your model based on the Linear Learner algorithm. What AWS services would you use to create your pipeline to feed your inference requests to your model? (Select THREE)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F. G.

Answers: B, D, E.

Option A is incorrect.

AWS IoT Greengrass is used to extend AWS to edge devices, such as your sensors in your farming containers.

Greengrass is used to perform prediction directly on the devices themselves.

IoT Core is a better option for receiving your MQTT IoT messages for processing via your machine learning inference running in Amazon SageMaker Hosting Services.

Option B is correct.

IoT Core is designed to allow IoT devices to interact with other AWS services, such as Kinesis Data Streams.

Option C is incorrect.

Elastic Beanstalk is used to host web applications or worker nodes for web applications.

You wouldn't use Elastic Beanstalk to stream IoT messages.

Option D is correct.

Kinesis Data Streams can receive IoT messages from IoT Core and stream them to your SageMaker inference endpoint via a Lambda function.

Option E is correct.

You can write a lambda function that is triggered by Kinesis Data Streams that transforms your IoT messages into the inference serialization format required by your inference endpoint.

Option F is incorrect.

API Gateway is used to create an API request endpoint.

You wouldn't use API Gateway to transform IoT message data.

You would have to have a lambda function behind your API Gateway to accomplish this.

Option G is incorrect.

Route 53 is Amazon's DNS server implementation.

You can't use Route 53 to transform messages.

Reference:

Please see the Amazon SageMaker developer guide titled Train a Model with Amazon SageMaker, the AWS IoT Core overview, the AWS IoT developer guide titled Creating an AWS Lambda Rule, and the AWS IoT Greengrass overview.

Here is a diagram of the proposed solution:

/-—MaTT Messages->}

‘Amazon 1oT
‘core Kinesis Dafa

Farming Container Sensors
ér Hosting Service Inference Endpoint

Lambda Function Transformer

To create a pipeline to feed inference requests to your Linear Learner model in Amazon SageMaker Hosting Services, you would need to use the following AWS services:

  1. IoT Core: IoT Core can be used to receive the IoT device MQTT messages. This is because it is designed to receive and process large volumes of data generated by IoT devices. It also provides features for security, device management, and message filtering.

  2. Kinesis Data Streams: Kinesis Data Streams can be used to stream the IoT messages to your pipeline. This is because it is designed for real-time data streaming and processing. It can handle large volumes of data and allows you to process data in near real-time using custom code or third-party applications.

  3. Lambda Function: A Lambda function can be used to transform the IoT message data to the inference request serialization format. This is because it is a serverless computing service that allows you to run code without managing servers. You can write a function to transform the data and trigger it in response to the arrival of new data in Kinesis Data Streams.

Therefore, the correct answers are: B. IoT Core to receive the IoT device MQTT messages, D. Kinesis Data Streams to stream the IoT messages, and E. A Lambda function to transform the IoT message data to the inference request serialization format.

The other options are incorrect because:

  • A. IoT Greengrass is a software that extends AWS IoT and provides local compute, messaging, data caching, and synchronization for connected devices. However, it is not required in this scenario.
  • C. Elastic Beanstalk is a fully managed service for deploying and scaling web applications and services. It is not designed for processing IoT messages.
  • F. API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs. It is not designed for processing IoT messages.
  • G. Route 53 is a domain name system (DNS) service that routes internet traffic to the appropriate resources. It is not designed for processing IoT messages.