EC2 的 IAM Role 可以動態改了...

EC2IAM Role 根本是開發階段最常重新啟動的理由之一 XDDD

AWS 總算把動態調整 IAM Role 的功能給做出來了:「New! Attach an AWS IAM Role to an Existing Amazon EC2 Instance by Using the AWS CLI」。

不過看到文章完全沒有截圖,心裡大概就猜得到目前 web console 還不支援了... 現在只能透過 command line 操作,像是「Attach the IAM role to an existing EC2 instance that was originally launched without an IAM role」這一段:

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

或是「Replace the attached IAM role」這段:

$ aws ec2 replace-iam-instance-profile-association --association-id YourCurrentAssociation-id --iam-instance-profile Name=YourReplacementRole-Instance-Profile

不過有進度總是比沒進度開心,這功能應該會加到 web console...

One thought on “EC2 的 IAM Role 可以動態改了...”

Leave a Reply

Your email address will not be published. Required fields are marked *