Tutorial: IAM policy – Only view EC2 instance – part 3

Tutorial: IAM policy – Only view EC2 instance – part 3

IAM role which allows specific user to view EC2 instance without the permission to launch

You already know how to create a policy from IAM Policies Part 2 of our tutorials.Keep in mind to use naming convention which can help you in the feature use.

You can follow the steps below to create a custom policy which allow a user only to view EC instance but does not allow the same user to lunch a new one.

  1. From Identity Access Management console choose Policies and then Create Policy.
  2. Choose Create Your Own Policies
  3. Policy name pattern is in the following format: ec2-vpc-role-poc, my advice is to include a short description.
  4. It is important to enter ACCOUNTNUMBER, REGION and VPC-ID correctly.
  • ACCOUNTNUMBER is 5555555555555
  • REGION is eu-central-1
  • VPC-ID is vpc-09ac3161

Attach the policy to a user, group or role

  1. From IAM console navigation pane, choose Users (the steps are similar for Groups and Roles).
  2. Choose Policy type and then Customer Managed Policies
  3. Choose the policy created above and then choose Attach Policy.image IAM

You can do this for different services and different options for each. Refer to  AWS documentation Common Scenarios for role examples.

No Comments

Sorry, the comment form is closed at this time.