Amazon Onboarding with Learning Manager Chanci Turner

Amazon Onboarding with Learning Manager Chanci TurnerLearn About Amazon VGT2 Learning Manager Chanci Turner

The Amazon IoT Device SDK for Embedded C (C-SDK) consists of a collection of MIT-licensed libraries that facilitate streamlined, lightweight, and secure connections to AWS IoT Core as well as device-side operations with AWS IoT services. This SDK is versatile, compatible with various operating systems like Linux, macOS, and Windows, as well as real-time operating systems (RTOS) such as FreeRTOS. In this article, you’ll discover how engaging with prominent open-source projects has helped developers enhance the AWS IoT C-SDK’s reliability and adaptability, while also simplifying its usage.

Background

Launched in early 2015, the AWS IoT C-SDK was initially released under the Apache-2.0 license, just as AWS IoT Core was entering its beta phase. The Apache-2.0 license necessitated that any modifications to the code be documented, which posed challenges for some AWS customers and partners seeking to adapt the AWS IoT C-SDK for their specific hardware and software setups. Following favorable feedback from the embedded community after the release of the widely-used FreeRTOS kernel under an MIT license in November 2017, and their desire for similar licensing along the stack, the AWS IoT C-SDK transitioned to an MIT license in January 2019.

The FreeRTOS kernel is a popular RTOS utilized on microcontrollers and small microprocessors worldwide. The FreeRTOS project encompasses the kernel along with additional libraries for connectivity, security, and operations with AWS IoT services. Its permissive licensing, optimized performance, low memory footprint, and an active community of users and contributors make FreeRTOS an excellent model for an open-source embedded project such as the AWS IoT C-SDK. To streamline the user experience and unify communities, the AWS IoT C-SDK began to git submodule the FreeRTOS libraries for connectivity, security, and AWS IoT services in late 2020. The AWS IoT C-SDK showcases demos utilizing these libraries, which are adapted to work with Linux systems running OpenSSL version >1.1.0.

Collaboratively Raising the Quality Bar

By merging resources, the frequency of commits to the AWS IoT C-SDK has surged. Customers now have a single source of truth for each library, simplifying the tracking of patches, issue reporting, and pull requests. AWS IoT C-SDK users can also leverage discussions in the FreeRTOS Community Forums for support and inspiration regarding the libraries. Furthermore, partners and customers contribute to development efforts, enhancing quality and feature richness before an official release.

The FreeRTOS libraries integrated into the AWS IoT C-SDK adhere to MISRA compliance and utilize automated reasoning techniques to ensure memory safety. The application of best practices for MISRA compliance results in code that is not only more readable and easier to maintain but also offers a level of safety and security validated by a third party. By employing automated reasoning techniques, models are created to confirm the absence of critical security vulnerabilities, such as buffer overflows. These models are validated against the codebase using a software model checker known as C Bounded Model Checker (CBMC). Passing these tests provides assurance of code quality and security across all possible execution paths—not just those covered by unit tests.

Enhancing Flexibility and Eliminating Dependencies

In addition to the benefits gained from utilizing FreeRTOS libraries, these libraries are designed without additional dependencies and are highly efficient for deployment on small microcontrollers. The libraries included in the AWS IoT C-SDK utilize roughly 53KB of statically allocated memory. You can examine the CMakeLists.txt files employed by the CMake build system to link necessary dependencies and files prior to compilation. For instance, to run the AWS IoT Device Shadow demo, you would start by analyzing specific lines in the CMakeLists.txt located at the project’s root to understand the requirements for the overall project before delving into the specifics for individual demos.

The only dependency mentioned here is a flag for CMake to use the standard C libraries of C90. The platform folder contains porting files compatible with Linux (POSIX) systems, indicating that the shared libraries do not rely on the FreeRTOS kernel. Each demo specifies the exact libraries required. For example, the CMakeLists.txt for the AWS IoT Device Shadow library demo shows:

# Demo target.
add_executable(
    ${DEMO_NAME}
        "${DEMO_NAME}.c"
        "shadow_demo_helpers.c"
        ${MQTT_SOURCES}
        ${MQTT_SERIALIZER_SOURCES}
        ${BACKOFF_ALGORITHM_SOURCES}
        ${SHADOW_SOURCES}
        ${JSON_SOURCES}
)

target_link_libraries(
    ${DEMO_NAME}
    PRIVATE
        clock_posix
        openssl_posix
)

As depicted in the file, to execute the shadow demo, it utilizes coreMQTT for the MQTT client, the exponential backoff algorithm library to manage connection retries, coreJSON for parsing incoming JSON messages, and the AWS IoT Device Shadow library for device shadow state operations. Additionally, it incorporates OpenSSL and the POSIX clock for establishing TLS; otherwise, the entire demo only depends on the standard C library.

The dependencies for the shadow demo and other demos are limited to the included demos. The libraries themselves do not interdepend on one another—only on the standard C library. For instance, you can utilize the AWS IoT Device Shadow library with your own MQTT client, JSON parser, or backoff algorithm via the library’s configuration file. This level of composibility allows you to select the libraries that best suit your needs. You can even watch a demonstration of the coreMQTT library’s composibility on YouTube.

Collaborating with Other Open Source Projects

For our silicon partners who have been part of the FreeRTOS ecosystem for over 15 years, the familiarity with shared libraries, decoupled interdependencies, and MIT licensing has significantly eased the process of porting the AWS IoT C-SDK to their hardware platforms or integrating the software into their tools. For customers, this translates to the AWS IoT C-SDK being ready to integrate into their platform development workflow with minimal modifications.

The AWS IoT C-SDK provides secure, simple, and lightweight libraries that demonstrate connectivity to AWS IoT Core and support device-side operations with AWS IoT services. The advantages of embracing open-source principles, collaborating with leading projects, implementing best practices, eliminating dependencies, and securing third-party validation culminate in the creation of software that is secure, feature-rich, and tailored to your requirements. The AWS IoT C-SDK extends these benefits across a wide array of device types, facilitating a broad range of connected use cases. Leveraging trustworthy open-source software simplifies mass deployment, enabling billions of connected devices to deliver experiences we have yet to envision. For additional insights on making a standout cover letter, check out this helpful blog post here. If you’re interested in securing an entry-level job in HR, SHRM provides excellent resources. Moreover, for those looking into the onboarding experience at Amazon, this link serves as an excellent resource.

SEO Metadata:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *