End of support notice: On October 7th, 2026, Amazon will discontinue support for Amazon IoT Greengrass Version 1. After October 7th, 2026, you will no longer be able to access the Amazon IoT Greengrass V1 resources. For more information, please visit Migrate from Amazon IoT Greengrass Version 1.
Install and run Amazon IoT Greengrass on the core device
Note
This tutorial provides instructions for you to run the Amazon IoT Greengrass Core software on a Raspberry Pi, but you can use any supported device.
In this section, you configure, install, and run the Amazon IoT Greengrass Core software on your core device.
To install and run Amazon IoT Greengrass
-
From the Amazon IoT Greengrass Core software section in this guide, download the Amazon IoT Greengrass Core software installation package. Choose the package that best fits the CPU architecture, distribution, and OS of your core device.
-
For Raspberry Pi, download the package for the Armv7l architecture and Linux operating system.
-
For an Amazon EC2 instance, download the package for the x86_64 architecture and Linux operating system.
-
For NVIDIA Jetson TX2, download the package for the Armv8 (AArch64) architecture and Linux operating system.
-
For Intel Atom, download the package for the x86_64 architecture and Linux operating system.
-
-
In previous steps, you downloaded five files to your computer:
-
greengrass-– This compressed file contains the Amazon IoT Greengrass Core software that runs on the core device.OS-architecture-1.11.6.tar.gz -
– The device certificate file.certificateId-certificate.pem.crt -
– The device certificate's public key file.certificateId-public.pem.key -
– The device certificate's private key file.certificateId-private.pem.key -
AmazonRootCA1.pem– The Amazon root certificate authority (CA) file.
In this step, you transfer these files from your computer to your core device. Do the following:
-
If you don't know the IP address of your Greengrass core device, open a terminal on the core device and run the following command.
Note
This command might not return the correct IP address for some devices. Consult the documentation for your device to retrieve your device IP address.
hostname -I -
Transfer these files from your computer to your core device. The file transfer steps vary depending on the operating system of your computer. Choose your operating system for steps that show how to transfer files to your Raspberry Pi device.
Note
For a Raspberry Pi, the default user name is
piand the default password israspberry.For an NVIDIA Jetson TX2, the default user name is
nvidiaand the default password isnvidia.
-
-
On the Greengrass core device, open a terminal, and navigate to the folder that contains the Amazon IoT Greengrass Core software and certificates. Replace
path-to-transferred-fileswith the path where you transferred the files on the core device. For example, on a Raspberry Pi, runcd /home/pi.cdpath-to-transferred-files -
Unpack the Amazon IoT Greengrass Core software on the core device. Run the following command to unpack the software archive that you transferred to the core device. This command uses the
-C /argument to create the/greengrassfolder in the root folder of the core device.sudo tar -xzvf greengrass-OS-architecture-1.11.6.tar.gz -C /Note
The version number in this command must match the version of your Amazon IoT Greengrass Core software package.
-
Move the certificates and keys to the Amazon IoT Greengrass Core software folder. Run the following commands to create a folder for certificates and move the certificates and keys to it. Replace
path-to-transferred-fileswith the path where you transferred the files on the core device, and replacecertificateIdwith the certificate ID in the file names. For example, on a Raspberry Pi, replacepath-to-transferred-fileswith/home/pisudo mvpath-to-transferred-files/certificateId-certificate.pem.crt /greengrass/certs sudo mvpath-to-transferred-files/certificateId-public.pem.key /greengrass/certs sudo mvpath-to-transferred-files/certificateId-private.pem.key /greengrass/certs sudo mvpath-to-transferred-files/AmazonRootCA1.pem /greengrass/certs -
The Amazon IoT Greengrass Core software uses a configuration file that specifies parameters for the software. This configuration file specifies the file paths for certificate files and the Amazon Web Services Cloud endpoints to use. In this step, you create the Amazon IoT Greengrass Core software configuration file for your core. Do the following:
-
Get the Amazon Resource Name (ARN) for your core's Amazon IoT thing. Do the following:
-
In the Amazon IoT console
, under Manage, under Greengrass devices, choose Groups (V1). -
On the Greengrass groups page, choose the group that you created earlier.
-
Under Overview, choose Greengrass core.
-
On the core details page, copy the Amazon IoT thing ARN, and save it to use in the Amazon IoT Greengrass Core configuration file.
-
-
Get the Amazon IoT device data endpoint for your Amazon Web Services account in the current Region. Devices use this endpoint to connect to Amazon as Amazon IoT things. Do the following:
-
In the Amazon IoT console
, choose Settings. -
Under Device data endpoint, copy the Endpoint, and save it to use in the Amazon IoT Greengrass Core configuration file.
-
-
Create the Amazon IoT Greengrass Core software configuration file. For example, you can run the following command to use GNU nano to create the file.
sudo nano /greengrass/config/config.jsonReplace the contents of the file with the following JSON document.
{ "coreThing" : { "caPath": "AmazonRootCA1.pem", "certPath": "certificateId-certificate.pem.crt", "keyPath": "certificateId-private.pem.key", "thingArn": "arn:aws-cn:iot:", "iotHost": "region:account-id:thing/MyGreengrassV1Coredevice-data-prefix-ats.iot.region.amazonaws.com", "ggHost": "greengrass-ats.iot.region.amazonaws.com", "keepAlive": 600 }, "runtime": { "cgroup": { "useSystemd": "yes" } }, "managedRespawn": false, "crypto": { "caPath": "file:///greengrass/certs/AmazonRootCA1.pem", "principals": { "SecretsManager": { "privateKeyPath": "file:///greengrass/certs/certificateId-private.pem.key" }, "IoTCertificate": { "privateKeyPath": "file:///greengrass/certs/certificateId-private.pem.key", "certificatePath": "file:///greengrass/certs/certificateId-certificate.pem.crt" } } } }Then, do the following:
-
If you downloaded a different Amazon root CA certificate than Amazon Root CA 1, replace each instance of
AmazonRootCA1.pemwith the name of the Amazon root CA file. -
Replace each instance of
certificateIdwith the certificate ID in the name of the certificate and key files. -
Replace
arn:aws-cn:iot:with the ARN of your core's thing that you saved earlier.region:account-id:thing/MyGreengrassV1Core -
Replace
MyGreengrassV1corewith the name of your core's thing. -
Replace
device-data-prefix-ats.iot.region.amazonaws.comwith the Amazon IoT device data endpoint that you saved earlier. -
Replace
regionwith your Amazon Web Services Region.
For more information about the configuration options that you can specify in this configuration file, see Amazon IoT Greengrass core configuration file.
-
-
-
Make sure that your core device is connected to the internet. Then, start Amazon IoT Greengrass on your core device.
cd /greengrass/ggc/core/ sudo ./greengrassd startYou should see a
Greengrass successfully startedmessage. Make a note of the PID.Note
To set up your core device to start Amazon IoT Greengrass on system boot, see Configure the init system to start the Greengrass daemon.
You can run the following command to confirm that the Amazon IoT Greengrass Core software (Greengrass daemon) is functioning. Replace
PID-numberwith your PID:ps aux | grepPID-numberYou should see an entry for the PID with a path to the running Greengrass daemon (for example,
/greengrass/ggc/packages/1.11.6/bin/daemon). If you run into issues starting Amazon IoT Greengrass, see Troubleshooting Amazon IoT Greengrass.