|
1 | | -**1. To create the default IAM roles for EMR and EC2** |
| 1 | +**1. To create the default IAM role for EC2** |
2 | 2 |
|
3 | 3 | - Command:: |
4 | 4 |
|
5 | 5 | aws emr create-default-roles |
6 | 6 |
|
7 | 7 | - Output:: |
8 | 8 |
|
9 | | - If both the roles already exist then the command returns nothing. |
| 9 | + If the role already exists then the command returns nothing. |
10 | 10 |
|
11 | | - If only one of the roles does not exist, the command returns the |
12 | | - created 'Role' and the 'RolePolicy'. |
13 | | - |
14 | | - If neither of the roles exist then the output will be: |
| 11 | + If the role does not exist then the output will be: |
15 | 12 |
|
16 | 13 | [ |
17 | 14 | { |
|
50 | 47 | } |
51 | 48 | ] |
52 | 49 | }, |
53 | | - "RoleId": "AROAJDKUOAL65X57SBWFK", |
| 50 | + "RoleId": "AROLORKUOAL65X57SBWFK", |
54 | 51 | "CreateDate": "2014-05-07T00:02:06.154Z", |
55 | 52 | "RoleName": "EMR_EC2_DefaultRole", |
56 | 53 | "Path": "/", |
57 | 54 | "Arn": "arn:aws:iam::176430881729:role/EMR_EC2_DefaultRole" |
58 | 55 | } |
59 | | - }, |
60 | | - { |
61 | | - "RolePolicy": { |
62 | | - "Version": "2012-10-17", |
63 | | - "Statement": [ |
64 | | - { |
65 | | - "Action": [ |
66 | | - "ec2:AuthorizeSecurityGroupIngress", |
67 | | - "ec2:CancelSpotInstanceRequests", |
68 | | - "ec2:CreateSecurityGroup", |
69 | | - "ec2:CreateTags", |
70 | | - "ec2:Describe*", |
71 | | - "ec2:DeleteTags", |
72 | | - "ec2:ModifyImageAttribute", |
73 | | - "ec2:ModifyInstanceAttribute", |
74 | | - "ec2:RequestSpotInstances", |
75 | | - "ec2:RunInstances", |
76 | | - "ec2:TerminateInstances", |
77 | | - "iam:PassRole", |
78 | | - "iam:ListRolePolicies", |
79 | | - "iam:GetRole", |
80 | | - "iam:GetRolePolicy", |
81 | | - "iam:ListInstanceProfiles", |
82 | | - "s3:Get*", |
83 | | - "s3:List*", |
84 | | - "s3:CreateBucket", |
85 | | - "sdb:BatchPutAttributes", |
86 | | - "sdb:Select" |
87 | | - ], |
88 | | - "Resource": "*", |
89 | | - "Effect": "Allow" |
90 | | - } |
91 | | - ] |
92 | | - }, |
93 | | - "Role": { |
94 | | - "AssumeRolePolicyDocument": { |
95 | | - "Version": "2008-10-17", |
96 | | - "Statement": [ |
97 | | - { |
98 | | - "Action": "sts:AssumeRole", |
99 | | - "Sid": "", |
100 | | - "Effect": "Allow", |
101 | | - "Principal": { |
102 | | - "Service": "elasticmapreduce.amazonaws.com" |
103 | | - } |
104 | | - } |
105 | | - ] |
106 | | - }, |
107 | | - "RoleId": "AROAJ46UH7B2XLI3RQAS4", |
108 | | - "CreateDate": "2014-05-07T00:02:08.724Z", |
109 | | - "RoleName": "EMR_DefaultRole", |
110 | | - "Path": "/", |
111 | | - "Arn": "arn:aws:iam::176430881729:role/EMR_DefaultRole" |
112 | | - } |
113 | 56 | } |
114 | | - ] |
| 57 | + ] |
0 commit comments