To use the AWS Systems Manager from an EC2 instance, we need to attach a role to an EC2 instance, as follows:
- Go to the IAM dashboard, click on Roles, and click on Create role.
- Select EC2 from the list of services.
You shouldn't choose the EC2 option mentioned separately at the top; instead, choose EC2 from the following bigger list of services.
- Scroll down and select EC2 Role for AWS Systems Manager.
- Click Next:Permissions.
- Verify that the AmazonEC2RoleforSSM role is attached. Click Next: Tags.
- Optionally, provide any tags. Click Next: Review.
- Give the role a name and click Create role:
We should see a message that says Role created successfully.
- Attach this role to our EC2 ...