AWS IoT Greengrass is an open-source edge-runtime and cloud service that helps you build, deploy, and manage multi-process applications at scale and across your IoT fleet.
AWS IoT Greengrass released V2 in December 2020 with a Java edge runtime known as a nucleus. With release 2.14.0 in December 2024, we introduced an additional edge runtime option, nucleus lite, which is written in C. AWS IoT Greengrass nucleus lite is a lightweight, open-source edge runtime that targets resource-constrained devices. It extends functional capabilities of AWS IoT Greengrass to low-cost, single-board computers for high-volume applications, such as smart home hubs, smart energy meters, smart vehicles, edge AI, and robotics.
This blog explains the merits of the two edge runtime options and provides guidance to help you choose the best option for your use case.
Key differences between nucleus and nucleus lite
AWS IoT Greengrass nucleus lite is fully compatible with the AWS IoT Greengrass V2 cloud service API and the inter-process communication (IPC) interface. This means you can build and deploy components that can target one or both runtimes, and you can continue to use the cloud service to manage your device fleet. However, nucleus lite has some important differences that make it better-suited to some use cases.
Memory footprint
AWS IoT Greengrass nucleus requires a minimum of 256 MB disk space and 96 MB RAM. However, we generally recommend a minimum of 512MB of RAM to account for the operating system, Java Virtual Machine (JVM), and your applications. Devices with at least 1GB of RAM are common.
In contrast, nucleus lite has a much smaller footprint. It requires less than 5MB of RAM and less than 5MB of storage (disk/flash). There is no dependency on the JVM and it relies only on the C standard library.
Figure 1: Memory footprint of nucleus versus nucleus lite
This smaller footprint opens new possibilities for you to create powerful IoT applications on resource-constrained devices.
Static memory allocation
The nucleus lite runtime memory footprint is determined during the initial configuration and build process. Once the runtime starts, nucleus lite allocates a fixed amount of memory that remains constant thereafter. This means that nucleus lite has predictable and repeatable resource requirements, minimal risk of memory leaks, and eliminates non-deterministic latency associated with garbage-collected languages. The only variations in memory usage comes from dynamic memory allocations performed by the AWS IoT Greengrass components you choose to deploy and by any programs you run outside of AWS IoT Greengrass.
Directory structure
Nucleus lite separates the nucleus lite runtime, Greengrass components, configuration, and logging into different areas on disk. On an embedded Linux system, these different elements can typically be stored in different partitions or even on different volumes. For example:
- The nucleus lite runtime might be stored in a read-only partition, as part of an A/B partitioning scheme, to enable Operating System (OS) image updates.
- The AWS IoT Greengrass components and configuration might be stored in a read-write partition or overlay so that your application can be managed by AWS IoT Greengrass deployments.
- Log files might be stored in a temporary partition, or on a different physical volume, so that logging doesn’t consume the limited flash memory write cycles of your root volume.
This separation helps you construct golden images for manufacturing your devices at scale. For more information see, Manufacturing devices at scale with AWS IoT Greengrass golden images.
Integration with systemd
Systemd is a system and service manager framework, commonly available on Linux systems, and is required for AWS IoT Greengrass nucleus lite.
When you install nucleus lite on your device, it’s installed as a collection of systemd services or daemons. For any AWS IoT Greengrass components that you choose to deploy to your device, nucleus lite also installs each component as a distinct systemd service. Nucleus lite can be thought of as a cloud-managed systemd, operating at scale across a fleet of devices.
Since you install nucleus lite and your components as systemd services, systemd handles and centralizes system logging. This means you can use familiar and common Linux system tools to monitor, maintain, and debug your device software
Choosing between nucleus and nucleus lite
Your choice between the nucleus and nucleus lite runtimes depends on your specific use case, device constraints, feature requirements, and operating system. The following table summarizes indications that can help you choose.
When should you use nucleus? | When should you use nucleus lite? |
|
|
Table 1: Indications for choosing between nucleus and nucleus lite
The indications outlined in Table 1 are not prescriptive, but general guidance. For example, based on your use case needs, you can use nucleus lite on resource-rich devices with Gigabytes of RAM. Or deploy components written in scripted or interpreted languages to nucleus lite, if your device has sufficient resources.
Scenarios and use cases
Use cases
With its significantly lower resource requirements, nucleus lite is well-suited for lower-cost devices with constrained memory and processing capacity, and carefully curated embedded Linux distributions. Such devices span many segments, including smart home, industrial, automotive, and smart metering.
Embedded systems
Nucleus lite represents a significant advancement for embedded systems developers by including support for embedded Linux from launch, as delivered by the meta-aws project. This project includes sample recipes to build AWS IoT Greengrass into your OpenEmbedded or Yocto projects. Its sister project, meta-aws-demos, includes numerous demonstrations of AWS IoT Greengrass, such as an image demonstrating A/B updates using RAUC.
Multi-tenancy support with containerized nucleus lite
With its small footprint, nucleus lite provides the opportunity for effective containerization in multi-tenant IoT deployments. You can run multiple isolated applications, each bundled with their own AWS IoT Greengrass runtime.
Figure 2: Multi-tenant containerization
Architecture benefits:
- Secure isolation: Each containerized instance maintains strict boundaries between applications.
- Resource optimization: Lightweight footprint enables multiple containers even in constrained environments.
- Independent operations: Applications can be managed, debugged, and updated independently.
- Flexible deployment: Support for different containerization strategies based on device capabilities.
Best practices for implementation
Using nucleus lite doesn’t require you to rewrite your components. However, you might choose to optimize or rewrite them if you want to maximize memory efficiency. There are several important considerations to keep in mind.
Plugin compatibility
Nucleus plugin components are specialized Java components that have tight integration with the original Java nucleus runtime. These plugins cannot be used with the nucleus lite runtime.
Component language considerations
When choosing programming languages for your custom components, you need to consider that each language interpreter or runtime environment adds to the overall memory footprint. Selecting languages like Python will offset some of the memory savings benefits of nucleus lite. If you select Java, you also need to introduce JVM to your system.
Recommendations for different scenarios
When migrating from nucleus to nucleus lite, your existing components can run as-is. This provides a quick transition to nucleus lite and maintains functionality while you plan any optimizations.
When starting from scratch:
- Consider rewriting critical components for maximum efficiency.
- Choose languages with minimal runtime overhead, such as C, C++, or Rust.
- Balance development effort versus memory optimization needs
When planning your memory budget:
- Account for all runtime dependencies in your memory calculations.
- Evaluate the total system footprint, not just the nucleus lite size.
- Consider component consolidation where appropriate.
Future outlook and conclusion
Looking ahead, AWS IoT Greengrass nucleus lite helps you to reimagine your edge computing implementations. By significantly reducing resource requirements, you can:
- Deploy IoT features on devices with limited resources.
- Implement edge computing solutions on a broader range of hardware.
- Reduce operational overhead while maintaining functionality.
- Enable new use cases previously constrained by resource requirements.
For developers, nucleus lite provides new opportunities to innovate at the edge. Instead of asking whether edge computing is possible on resource-constrained devices, you can focus on implementing solutions that drive business value.
This enhancement to the AWS IoT portfolio demonstrates our commitment to helping you build efficient and scalable IoT solutions across a broader range of devices and use cases.
Now that you’re ready to start developing IoT solutions with AWS IoT Greengrass nucleus lite, we invite you to:
__________________________________________________________________________________________________________
About the authors
Camilla Panni is a Solutions Architect at Amazon Web Services. She helps Public Sector customers across Italy to accelerate their cloud adoption journey. Her technical background in automation and IoT fuels her passion to help customers innovate with emerging technologies.
Greg Breen is a Senior IoT Specialist Solutions Architect at Amazon Web Services. Based in Australia, he helps customers throughout Asia Pacific to build their IoT solutions. With deep experience in embedded systems, he has a particular interest in assisting product development teams to bring their devices to market.