Run AWS Greengrass on ESP32 with Zerynth


#1

Hello everyone,

I’m trying to run the provided example for AWS Greengrass. When I’m doing it i get some troubles while performing “info = gg.discover(thing_conf[‘endpoint’], thing_conf[‘thingname’], clicert, pkey)”

my json file states as follows:
{
“cert_arn”: “arn:aws:iot:eu-central-1:797949690083:cert/4e945b68b13e4199691f1c69173d5b0896ecfbb8e5ff25f58ab0e73de0772xxx”,
“endpoint”: “abcxxxxxxxx-ats.iot.eu-central-1.amazonaws.com”,
“mqttid”: “zdev_0”,
“policy_name”: “zgg_policy”,
“thingname”: “zdev_0”
}

zdev_0 is the iot device connected to the core. I have already included it in the Greengrass Group and created a subscription from the device to the Cloud and re-deployed my group. The topic has been also replaced in the example.

The policy I use should accept Greengrass comunication:

{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Action”: [
“iot:Publish”,
“iot:Subscribe”,
“iot:Connect”,
“iot:Receive”
],
“Resource”: [
"
]
},
{
“Effect”: “Allow”,
“Action”: [
"greengrass:

],
“Resource”: [
“*”
]
}
]
}

Should I specify somewhere the name of the core, what to do with the root-ca-cert.pem file? by now I have the private.pem.key and certificate.pem.crt with the certificates corresponding to the device zdev_0 when created it through the console.

Any help is appreciated. Thanks in advance