- Newest
- Most votes
- Most comments
Thanks Kwonyul. Your repo is very helpful. I got it working to create a local shadow manager. I really appreciate your quick response!!
To get my IoT code syncing local shadows to IoT core, I needed to set permissions for the policy that greengrass v2 uses connect so that the shadow manager so that it can communicate with the IOT core.
I needed to add some extra permissions to GreengrassV2IoTThingPolicy. I did this manually in the console via Thing->Certificate->Policies->GreengrassV2IoTThingPolicy
{
"Effect": "Allow",
"Action": [
"iot:GetThingShadow",
"iot:UpdateThingShadow",
"iot:DeleteThingShadow"
],
"Resource": "*"
}
Is there any way to add these permission using CDK?
Also, lastly :), are there any updates on using wildcards for Named Shadow in Shadow Manager syncing as per this post? My particular use case needs this as I would like a physical IoT device to create multiple local named shadows "on the fly" that can be managed in IoT core. Having to update the "Configuration merge" on the shadow manager component each time is a big limitation.
Many thanks for all your help! Oide
Hi Oide,
To deploy a public component you do not need to create your own copy of it, which is what you're doing. Simply add the public component name and version into the deployment request. https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.html
Thanks for reaching to me. I will add a new feature in “https://github.com/aws-samples/aws-iot-greengrass-v2-using-aws-cdk” by this weekend, where public component deployment will be covered. We don't need to upload the asset for public components, all we need to do is set the configuration information. But in fact, it is not easy to set where and how. So I'll implement that sample case and pass it on that repository on soon.
Hi Oide,
I have added a usecase of public components deployment you requested to my repo(https://github.com/aws-samples/aws-iot-greengrass-v2-using-aws-cdk). You can find that in https://github.com/aws-samples/aws-iot-greengrass-v2-using-aws-cdk/blob/main/infra/stack/greengrass/component-deployment-stack.ts - "createPublicComponents()". Enjoy that~.
Relevant content
- asked 10 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
For first question: In https://github.com/aws-samples/aws-iot-greengrass-v2-using-aws-cdk/blob/main/infra/stack/iot/thing-installer-stack.ts file, update createGreengrassV2TokenExchangeRoleAccessPolicy() method and re-deploy this stack.