[SOLVED] UbuntuCore aws-iot-greengrass certificates installing


I’m configuring the aws-iot-greengrass snap. At this point, I got stuck at the certificates setting step.

I’m running :

sudo snap set aws-iot-greengrass gg-certs=~/../../tmp/my-certs/123456789-setup.tar.gz
  • 123456789-setup.tar.gz contains the certificates that I previously downloaded from AWS IoT Core for this device.
  • my-certs is a folder a created into the tmp path.

I receive next error:

error: cannot perform the following tasks:

  • Run configure hook of “aws-iot-greengrass” snap (run hook “configure”: gg-certs (~/…/…/tmp/my-certs/123456789-setup.tar.gz) does not exist)

By running:

snap services aws-iot-greengrass

I receive:

greengrassd--------------disabled------------------inactive ------------------- -

So it’s evident that the aws-iot-greengrass daemon is not running (due to the certificates).

I’ve tried to copy the certificates directly to the “/snap/aws-iot-greengrass/current/certs/” path, but as almost all directories in UbuntuCore, it’s a only-read one.

Do you know if I am doing something wrong or is there another way to do it?

I’m not familiar with this snap specifically but I would try copying the certs to /var/snap/aws-iot-greengrass/current/certs/. The /var/snap directories are the only writable directories available to a snap by default.

1 Like

the file needs to be an absolute path, try again with ~ expanded like in

sudo snap set aws-iot-greengrass gg-certs=$HOME/../../tmp/my-certs/123456789-setup.tar.gz

This worked, thanks for the clue @ryanjyoder :grinning:

  1. I created a folder in /var/snap/aws-iot-greengrass/current/:

mkdir my-certs

  1. Copied the 123456789-setup.tar.gz (certificates) to the new path.

cp -r 123456789-setup.tar.gz /var/snap/aws-iot-greengrass/current/my-certs

  1. Finally I set the certificates

sudo snap set aws-iot-greengrass gg-certs=/home/my-user/…/…/var/snap/aws-iot-greengrass/current/my-certs/123456789-setup.tar.gz

  • my-user is the user you use to login in UbuntuCore via ssh: my-user@XX.XXX.XX.XX
1 Like