I could not find a way to attach/replace an IAM role to the EC2 instance via boto3.
The documentation at cloudhackers provides a method to run image with IAM role, but not to attach.
Is it possible with boto? Otherwise, I need to do it manual.
I could not find a way to attach/replace an IAM role to the EC2 instance via boto3.
The documentation at cloudhackers provides a method to run image with IAM role, but not to attach.
Is it possible with boto? Otherwise, I need to do it manual.
Read the docs here
associate_iam_instance_profile(**kwargs)
Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.
Request Syntax
Response Syntax
By the way, the link you gave has a banner on top saying