Associate a Role to a running AWS instance

前端 未结 4 834
陌清茗
陌清茗 2021-02-13 04:40

In order to run AWS monitoring scripts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html) on one of my ec2 existing instance, I need a IAM

4条回答
  •  礼貌的吻别
    2021-02-13 05:03

    There is a new method available associate-iam-instance-profile to Associates an IAM instance profile with a running or stopped instance.

    Example:

    aws ec2 associate-iam-instance-profile --instance-id YourInstanceId --iam-instance-profile Name=YourNewRole-Instance-Profile
    

    Doco

提交回复
热议问题