Menu
AWS Greengrass
Developer Guide

Preparing a Raspberry Pi for Greengrass

Follow these steps to prepare your Raspberry Pi for running the AWS Greengrass core software and using the AWS IoT Device SDK for C++.

To run the AWS Greengrass core software:

  1. Use the following commands to add a user named ggc_user and a group named ggc_group:

    Copy
    sudo adduser --system ggc_user sudo addgroup --system ggc_group
  2. Use the following commands to update your Raspberry Pi kernel to 4.9:

    Copy
    sudo apt-get install rpi-update sudo rpi-update
  3. Use the following command to install sqlite3:

    Copy
    sudo apt-get install sqlite3

To use the AWS IoT Device SDK

  1. Use the following command to install cmake:

    Copy
    sudo apt-get install cmake
  2. Install OpenSSL 1.0.2 developer version.

    1. Add the following text at the end of /etc/apt/sources.list.d/raspi.list:

      Copy
      deb http://ftp.debian.org/debian jessie-backports main
    2. Run the following command to update the package list for apt-get:

      Copy
      sudo apt-get update

      Note

      If you get a NO_PUBKEY error, follow these instructions on the CCM website, and then rerun the sudo apt-get update command.

    3. Use the following command to install OpenSSL:

      Copy
      sudo apt-get -t jessie-backports install libssl-dev

The AWS Greengrass core software checks if hardlink/softlink protection is activated on the operating system at startup. We recommend that you activate this protection to improve security on your device. Follow these instructions.

  1. Set system variables by adding the following two lines to /etc/sysctl.d/98-rpi.conf:

    Copy
    fs.protected_hardlinks = 1 fs.protected_symlinks = 1

    If the file /etc/sysctl.d/98-rpi.conf doesn't exist, follow the instructions in /etc/sysctl.d/README.sysctl.

  2. Reboot the system:

    Copy
    sudo reboot
  3. Validate the change by running:

    Copy
    sudo sysctl -a | grep fs

    If the system variables were set successfully, the following text is displayed:

    Copy
    fs.protected_hardlinks = 1 fs.protected_symlinks = 1