aws ec2 replace-iam-instance-profile-association
Replaces an IAM instance profile for the specified running instance. AWS CLI reference
2 options Its page in the AWS CLI reference
Options
--association-idThe ID of the existing IAM instance profile association.--iam-instance-profileThe IAM instance profile.