AWS IoT Greengrass enables edge devices to act locally on the data they generate while leveraging the cloud for management, storage, and analytics. This guide walks you through setting up AWS IoT Greengrass on a Revolution Pi system, a modular industrial PC system designed for automation projects.

Prerequisites #

✓ A valid AWS account.
✓ RevPi device with internet access.
✓ Basic familiarity with Linux or Windows operating systems.
✓ AWS CLI installed and configured.
✓ Python 3.5+ installed and added to the PATH environment variable.

Hardware #

✓ RevPi Core 3 or newer models (e.g. RevPi Core 3+, RevPi Connect+, RevPi Connect SE, etc.).
✓ Standard kit components: RevPi device, power supply, and wiring tools.
✓ Additional items: PC (Windows, Linux, or Mac), minimum 11 W power supply, slotted screwdriver, and wire stripper.

Software #

✓ Python 3.5+
✓ AWS CLI (v1.18.197 or v2.1.11 or later)
✓ Java Runtime Environment 8+ for Greengrass

▷ Install the necessary software: * Python 3.5 or later * AWS CLI and configure with your AWS credentials * Java Runtime Environment (JRE) on RevPi

sudo apt install default-jdk
java -version

▷ Ensure the RevPi and development PC are set to the same AWS region.

▷ Flash the operating system on the RevPi following the user manual.

▷ Connect to the RevPi using SSH (e.g., PuTTY).

▷ Update and verify the RevPi software: * Install Java. * Test internet connectivity.

Step 1: Configuring AWS Account and Permissions #

▷ Sign in to the AWS Management Console.

▷ Go to Access Management and select Users.

▷ Select Add User and your user name.

▷ On Select AWS Credential Type, select Access Key — Programmatic Access and next.

▷ On Attach existing policies directly (details on provisioning policies), search for:

  • IAMFullAccess

  • AmazonS3FullAccess

  • AWSIoTFullAccess

  • AWSGreengrassFullAccess

▷ Select Create user.

▷ Download the .csv.

▷ Copy the access key ID and the secret access key.

▷ Paste the access key ID and the secret access key on your RevPi SSH console using the following command lines:

   export AWS_ACCESS_KEY_ID=your_access_key
   export AWS_SECRET_ACCESS_KEY=your_secret_key

Step 2: Creating AWS IoT Resources #

▷ Use the AWS IoT console to:

▷ Pay special attention to the notes.

Step 3: Installing AWS IoT Greengrass Core #

▷ Download the Greengrass Core software on the RevPi:

   curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip

▷ Run the installer:

   sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE \
   -jar ./GreengrassInstaller/lib/Greengrass.jar \
   --aws-region region \
   --thing-name MyGreengrassCore \
   --thing-group-name MyGreengrassCoreGroup \
   --thing-policy-name GreengrassV2IoTThingPolicy \
   --setup-system-service true

The local development tools (specified by the --deploy-dev-tools option) take some time to deploy.

▷ The following command can be used to check the status of this deployment:

aws greengrassv2 list-effective-deployments --core-device-thing-name thing-name

❯ The status is Succeeded.

▷ Run the following command to verify that the Greengrass CLI is installed and runs on your device:

/greengrass/v2/bin/greengrass-cli help

▷ Under AWS IoT Greengrass console, select Core Devices.

▷ Check if the status of your RevPiRevPi is healthy.

❯ Now your device is ready to go. Enjoy using AWS Greengrass.

Step 4: Creating a Hello World Component #

▷ Develop a Hello World component on the RevPi:

  • Create and test the component locally.

  • Use the AWS console or CLI to upload the component to the cloud.

  • Deploy the component to your RevPi using the AWS IoT Greengrass console.

Step 5: Verification and Troubleshooting #

▷ Verify the deployment:

  • Check the status of your RevPi in the AWS IoT Greengrass console.

  • Ensure the status is healthy.

  • If issues arise, refer to the RevPi support forum or AWS documentation.

❯❯ Your RevPi is now configured with AWS IoT Greengrass, ready to process edge data and seamlessly integrate with AWS cloud services.