You've already forked devops-exercises
Rename exercises dir
Name it instead "topics" so it won't be strange if some topics included "exercises" directory.
This commit is contained in:
11
topics/aws/exercises/ec2_iam_roles/exercise.md
Normal file
11
topics/aws/exercises/ec2_iam_roles/exercise.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## AWS EC2 - IAM Roles
|
||||
|
||||
### Requirements
|
||||
|
||||
1. Running EC2 instance without any IAM roles (so you if you connect the instance and try to run AWS commands, it fails)
|
||||
2. IAM role with "IAMReadOnlyAccess" policy
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Attach a role (and if such role doesn't exists, create it) with "IAMReadOnlyAccess" policy to the EC2 instance
|
||||
2. Verify you can run AWS commands in the instance
|
||||
21
topics/aws/exercises/ec2_iam_roles/solution.md
Normal file
21
topics/aws/exercises/ec2_iam_roles/solution.md
Normal file
@@ -0,0 +1,21 @@
|
||||
## AWS EC2 - IAM Roles
|
||||
|
||||
### Requirements
|
||||
|
||||
1. Running EC2 instance without any IAM roles (so you if you connect the instance and try to run AWS commands, it fails)
|
||||
2. IAM role with "IAMReadOnlyAccess" policy
|
||||
|
||||
### Objectives
|
||||
|
||||
1. Attach a role (and if such role doesn't exists, create it) with "IAMReadOnlyAccess" policy to the EC2 instance
|
||||
2. Verify you can run AWS commands in the instance
|
||||
|
||||
### Solution
|
||||
|
||||
#### Console
|
||||
|
||||
1. Go to EC2 service
|
||||
2. Click on the instance to which you would like to attach the IAM role
|
||||
3. Click on "Actions" -> "Security" -> "Modify IAM Role"
|
||||
4. Choose the IAM role with "IAMReadOnlyAccess" policy and click on "Save"
|
||||
5. Running AWS commands now in the instance should work fine (e.g. `aws iam list-users`)
|
||||
Reference in New Issue
Block a user