Changing the Greengrass V2 core device IAM role after install

1

See: https://docs.aws.amazon.com/greengrass/v2/developerguide/device-service-role.html

Is it possible to change the device service role after the device has been installed ? I have a number of devices with the default 'GreengrassV2TokenExchangeRoleAccess' IAM policy. Is it possible to point them to a new policy, without re-installing greengrass v2 on the core device ?

2 Answers
0

The linked documentation tells you how to edit: https://docs.aws.amazon.com/greengrass/v2/developerguide/device-service-role.html#device-service-role-access-s3-bucket.

It is just an IAM role, so you can easily edit the policy and add and remove policies as needed.

AWS
EXPERT
answered a year ago
  • Thanks for the link. I should have specified in my question - rather than adding/removing permissions from the role, is it possible to change the core device service role itself ?

    Example: I create a gg v2 core device with the default role.

    Later on I create a new role called MyCustomRole. I now want to change the core device service role to MyCustomRole, without re-running the install script. Is this possible ?

0

AWS IoT Greengrass uses AWS IoT Role Aliases. To change the role associated to the role alias configured for the Greengrass core device you can use the following API: https://docs.aws.amazon.com/iot/latest/apireference/API_UpdateRoleAlias.html.

You can also perform the operation from the console https://console.aws.amazon.com/iot/home?#/rolealiashub

AWS
EXPERT
answered a year ago
  • In my case, the IoT Role Alias has also changed. Is it possible to change the IoT Role Alias (as in the example above, meaning to associate a device with a totally different role alias, a different ARN) after the greengrass core v2 device has been setup ?

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