|
1 | 1 | +++ |
2 | | -title = "d. Attach Role to Cloud9 Instance" |
| 2 | +title = "d. Temporary credentials on Cloud9" |
3 | 3 | date = 2019-09-18T10:46:30-04:00 |
4 | 4 | weight = 80 |
5 | 5 | tags = ["tutorial", "install", "IAM"] |
6 | 6 | +++ |
7 | 7 |
|
8 | | -In this step, you will create an [IAM](https://aws.amazon.com/iam/) role with Administrator access and configure Cloud9 to use the IAM role for the rest of this lab. |
| 8 | +In this step, you will turn off the temporary credentials managed by Cloud9. |
| 9 | +You AWS Cloud9 instance has been created for this lab with the IAM role that allows your Cloud9 instance to access any services of your AWS account |
9 | 10 |
|
10 | 11 | AWS Identity and Access Management (IAM) enables you to manage access to AWS services and resources securely. |
11 | 12 | Using IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources. |
12 | 13 |
|
13 | | -By configuring Cloud9 to use the IAM role, you will allow your Cloud9 instance to access any services of your AWS account. |
14 | 14 |
|
| 15 | +1. In Cloud9, choose the gear icon in top right corner to open a new tab and choose "Preferences” tab. |
15 | 16 |
|
16 | | -1. Follow [this link to create an IAM role with Administrator access](https://console.aws.amazon.com/iam/home#/roles$new?step=review&commonUseCase=EC2%2BEC2&selectedUseCase=EC2&policies=arn:aws:iam::aws:policy%2FAdministratorAccess). |
17 | | - |
18 | | -2. Confirm that **AWS service** and **EC2** are selected, then click **Next: Permissions** to view permissions. |
19 | | - |
20 | | -3. Confirm that **AdministratorAccess** is checked, then click **Next: Tags** to assign tags. |
21 | | - |
22 | | -4. Take the defaults, and click **Next: Review** to review. |
23 | | - |
24 | | -5. Enter **hpcworkshop-admin** for the Name, and click **Create role**. |
25 | | - |
26 | | - |
27 | | -6. Follow [this link to find your Cloud9 EC2 instance](https://console.aws.amazon.com/ec2/v2/home?#Instances:search=cloud9;sort=desc:launchTime). |
28 | | - |
29 | | -7. Select the Cloud9 instance. |
30 | | -8. For **Actions**, choose **Security**, select **Modify IAM Role**. |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | -9. For **IAM Role**, choose **hpcworkshop-admin**. |
36 | | -10. Choose **Save**. |
37 | | - |
38 | | - |
39 | | -11. In Cloud9, choose the gear icon in top right corner to open a new tab and choose "Preferences” tab. |
40 | | - |
41 | | -12. In the Preferences tab, choose **AWS SETTINGS** to turn off **AWS managed temporary credentials**, then close the Preferences tab. |
| 17 | +2. In the Preferences tab, choose **AWS SETTINGS** to turn off **AWS managed temporary credentials**, then close the Preferences tab. |
42 | 18 |
|
43 | 19 |  |
44 | 20 |
|
45 | | -13. Identify the AWS region with the following commands: |
| 21 | +3. Identify the AWS region with the following commands in the Cloud9 terminal: |
46 | 22 |
|
47 | 23 | ```bash |
48 | 24 | export AWS_REGION=$(curl --silent http://169.254.169.254/latest/meta-data/placement/region) |
49 | 25 | echo $AWS_REGION |
50 | 26 | ``` |
51 | 27 |
|
52 | | -14. Configure the AWS CLI to use this AWS region: |
| 28 | +4. Configure the AWS CLI to use this AWS region: |
53 | 29 |
|
54 | 30 | ```bash |
55 | 31 | aws configure set default.region ${AWS_REGION} |
|
0 commit comments