Yes, ggc_user's profile should be enough to run
greengrass-cli component restart in another component's lifecycle.
However, please note that
greengrass-cli component restart only works on a non-broken component.
When ComponentA errors, greengrass will retry its lifecycle 3 times and transition it to broken state if all retries fail. After ComponentA is in a broken state, running
greengrass-cli component restart -n ComponentA cannot restart the component. The only way to resurrect it is via deployment.
Thank you but this makes no sense to me. When GreenGrass-cli is installed as a component, it defaults to gcc_user to use that user, also the user greengrass is being managed is say 'myadmin'. Manually I can execute greengrass-cli using sudo and that 'myadmin' account. When my software runs it shells using sudo -u myadmin -S etc so it has exactly the same context and security as when manually. ggc_user is already member of ggc_group and the 'myadmin' is member of ggc_group.
So, greengrass_cli is by default not executed by ggc_user?
Hi, have you authorized
ggc_user to use the
greengrass-cli? You need to do that as described here https://docs.aws.amazon.com/greengrass/v2/developerguide/install-gg-cli.html and https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-cli-component.html#greengrass-cli-component-configuration i.e. add the
ggc_user to a group and set that group as the
AuthorizedPosixGroups in component configuration for
aws.greengrass.Cli component through a deployment from your AWS account. Let us know if you face any issues with that or still can't get it to work
Greengrass V2 Custom Component having S3client | Javaasked 2 months ago
Running greengrass-cli from a greengrass component; what's going on here?asked 7 months ago
Greengrass Component Local Log IntervalAccepted Answerasked 3 months ago
How to remove a component from running on an installationAccepted Answerasked 3 months ago
Running Greengrass-cli from gg component, not authorized, while same user context mannually works.asked 6 months ago
Best way to restart a Greengrass component, from another componentasked a year ago
Greengrass V2: LegacySubscriptionRouter component target LambdaNotFoundExceptionasked 7 months ago
Greengrass component deployment questionasked a month ago
Greengrass Core V2 - Restart component on config changeasked 6 months ago
Greengrass v2 add componentAccepted Answerasked a year ago