aws ssm update-managed-instance-role
Changes the Identity and Access Management (IAM) role that is assigned to the on-premises server, edge device, or virtual machines (VM). AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To update the IAM role of a managed instance
The following update-managed-instance-role example updates the IAM instance profile of a managed instance.
aws ssm update-managed-instance-role --instance-id "mi-08ab247cdfEXAMPLE" --iam-role "ExampleRole"Identify--instance-idThe ID of the managed node where you want to update the role.--iam-roleThe name of the Identity and Access Management (IAM) role that you want to assign to the managed node.This command produces no output.
For more information, see Step 4: Create an IAM Instance Profile for Systems Manager in the AWS Systems Manager User Guide.
Options
--iam-roleThe name of the Identity and Access Management (IAM) role that you want to assign to the managed node.--instance-idThe ID of the managed node where you want to update the role.