How do I assign an existing IAM role to an EC2 instance?
1 minute read
0
I have an AWS Identity and Access Management (IAM) role that I want to assign to an Amazon Elastic Compute Cloud (Amazon EC2) instance.
Resolution
Use either the Amazon EC2 console of the AWS Command Line Interface (AWS CLI) to assign a role. For more information, see Attach an IAM role to an instance.
If you use AWS Systems Manager, then wait for AWS Systems Manager Agent (SSM Agent) to detect the new IAM role, or restart SSM Agent. For more information, see Setting up AWS Systems Manager.