GreengrassV2 fleetprovisioning Error "No shadow exists with name:"

1

Hello everyone,

I am using greengrassV2 with fleetprovisioning to create coreDevices. When I provision a new device i get the following error in AWS IoT Logs:

{
    "timestamp": "2023-08-11 14:01:38.435",
    "logLevel": "ERROR",
    "traceId": "ce346c66-3d5f-7d92-f9ca-942345b71717",
    "accountId": "*******",
    "status": "Failure",
    "eventType": "GetThingShadow",
    "protocol": "HTTP",
    "deviceShadowName": "Tatooine_52e208k762634e5ead10d2be7dec2fjk",
    "details": "No shadow exists with name: 'Tatooine_52e208k762634e5ead10d2be7dec2fjk'"
}

Policys for testing are:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "*",
      "Resource": "*"
    }
  ]
}

I can see that when I create a coreDevice in AWS Console and install it manually on a server, a shadow with the name "AWSManagedGreengrassV2Deployment" is created. But not with fleetprovisioning.

Why is this shadow not created and is this related to my error message in IOT console? How can I further debug this issue? I have not found much information on the shadow and why it is needed?

Best Regards Marco

Marco
已提问 10 个月前215 查看次数
1 回答
1
已接受的回答

The "AWSManagedGreengrassV2Deployment" shadow is created when a thing deployment is created. This deployment shadow isn't created just because a core device is provisioned. The console flow will create a deployment for the customer to deploy dev tools.

With fleet provisioning, unless you use a pre-provisioning hook that creates a "thing" deployment, there is no shadow no thing deployment is created.

The "ERROR" is not a failure - Greengrass on the device is asking for the deployment shadow to see if there is a deployment it needs to process. When no deployment has been created, this will log as an error in IoT logs because it is asking for a shadow that doesn't exist. The device handles this as there is no deployment necessary.

Clarification update: The missing shadow does not cause any cloud or device impact with Greengrass. It is expected to see this log if you don't create a thing deployment. As Michael mentioned, thing group deployments do not update the shadow for each thing in the group.

AWS
Rob
已回答 10 个月前
AWS
专家
已审核 10 个月前
profile pictureAWS
专家
Greg_B
已审核 10 个月前
  • Thanks for the reply, that sounds plausible. However, I create a deployment for a ThingGroup via CDK. The deployment runs without problems, but the shadow is not created. I create the deployment before I create a coreDevice so that it automatically receives the deployment.

    Do I have to create the shadow manually or could it be due to an error when creating the deployment?

  • Hi Marco, Group deployments do not use shadow. Whether or not the shadow exists does not matter.

    The deployment shadow is created only when making a thing (not group) deployment. This will happen if you're installing using --deploy-dev-tools true.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则