Selection - IoT Lens


Well-Architected IoT solutions are made up of multiple systems and components such as devices, connectivity, databases, data processing, and analytics. In AWS, there are several IoT services, database offerings, and analytics solutions that enable you to quickly build solutions that are well architected while allowing you to focus on business objectives. AWS recommends that you use a mix of managed AWS services that best fit your workload. The following questions focus on these considerations for performance efficiency.

IOTPERF 01. How do you ensure your IoT application’s performance and have the capabilities to measure it?

When you select the implementation for your architecture, use a data-driven approach based on the long-term view of your operation. IoT applications align naturally to event driven architectures. Your architecture will combine services that integrate with event-driven patterns such as notifications, publishing and subscribing to data, stream processing, and event-driven compute. In the following sections, we look at the five main IoT resource types that you should consider (devices, connectivity, databases, compute, and analytics).


The optimal embedded software for a particular system will vary based on the hardware footprint of the device. For example, network security protocols, while necessary for preserving data privacy and integrity, can have a relatively large RAM footprint. For intranet and internet connections, use TLS with a combination of a strong cipher suite and minimal footprint. AWS IoT supports Elliptic Curve Cryptography (ECC) for devices connecting to AWS IoT using TLS. A secure software and hardware platform on device should take precedence during the selection criteria for your devices. AWS also has a number of IoT partners that provide hardware solutions that can securely integrate to AWS IoT.

In addition to selecting the right hardware partner, you might choose to use a number of software components to run your application logic on the device, including FreeRTOS and AWS IoT Greengrass. You can orchestrate native OS processes on specific hardware to improve performance and you also can run containerized workloads for isolation.

Defining and analyzing key performance metrics for your IoT applications helps you to understand the performance characteristics for your application. Logging and end-to-end application monitoring are key to measuring, evaluating, and optimizing the performance of your IoT applications.

Best practice IOTPERF_1.1 – Analyze the runtime performance of your application

Application performance in production can be different from what you observe in a controlled test environment. Actively analyzing the performance of your application based on device health, network latency, and payload size provides insight on how to obtain performance improvements. By using different types of metrics, the health of each device in a multi-device setting can be obtained.

Recommendation IOTPERF_1.1.1Analyze connection patterns, sensor data and set up a device security profile to detect anomalies

Best practice IOTPERF_1.2 – Add timestamps to each message published

Timestamps (ideally in UTC time) help in determining delays that might occur during the transmission of a message from the device to the application. Timestamps can be associated with the message and to fields contained in the message. If a timestamp is included, the sent timestamp, along with the sensor or event data, is recorded on the cloud-side.

Recommendation IOTPERF_1.2.1Add timestamps on the server side

  • If the devices lack the capability to add timestamps to the messages, consider using server-side features to enrich the messages with timestamps that correspond to receiving the message.

  • For example, AWS IoT Rules SQL language provides a timestamp() function to generate a timestamp when the message is received.

Recommendation IOTPERF_1.2.2Have a reliable time source on the device

  • Without a reliable time source, the timestamp can only be used relative to the specific device. For example:

    • Devices should use the Network Time Protocol (NTP) to obtain a reliable time when connected.

    • Real Time Clock (RTC) devices can be used to maintain an accurate time while the device lacks network connectivity.

Best practice IOTPERF_1.3 – Load test your IoT applications

Applications can be complex and have multiple dependencies. Testing the application under load helps identify problems before going into production. Load testing your IoT applications ensures that you understand the cloud-side performance characteristics and failure modes of your IoT architecture. Testing helps you understand how your application architecture operates under load, identify any performance bottlenecks, and apply mitigating strategies prior to releasing changes to your production systems.

Recommendation IOTPERF_1.3.1Simulate the real device behavior

  • A device simulator should implement the device behavior as closely as possible. Test not only message publishing, but also connections, reconnections, subscriptions, enrollment and other environmental disruptive events. Start testing at a lower load, and progressively increase to 100%.

    • Start the load test at a low percent of your estimated total device fleet, for example, 10%.

    • Evaluate the performance of your application using operational dashboards created to measure end-to-end delivery of device telemetry data and automated device commands.

    • Make any necessary changes to the application architecture to achieve desired performance goals.

    • Iterate these steps increasing the load until you get to 100%.

  • IoT Device Simulator

  • From testing to scaling