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
asked 9 months ago203 views
1 Answer
1
Accepted Answer

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
answered 9 months ago
AWS
EXPERT
reviewed 9 months ago
profile pictureAWS
EXPERT
Greg_B
reviewed 9 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions