Skip to content

Commit d3fcf66

Browse files
committed
docs: Add comand references for IAM policy
1 parent cfcc51c commit d3fcf66

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/concepts/authnz/index.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,31 @@ not made from the IP address 1.2.3.4.
204204
These policies are standalone on their own. They need to be attached to the user
205205
in order to apply them.
206206

207+
#### Create IAM Policy
208+
209+
- Admin users can create IAM policies using the `IAM:CreatePolicy` operation.
210+
211+
Here is AWS CLI reference to create IAM policy
212+
213+
```bash
214+
aws iam create-policy --policy-name org-level-unique-policy-name --policy-document file:///path/to/policy.json
215+
```
216+
217+
Policy creation has no impact on authorization until it is attached to a user.
218+
219+
#### Attach IAM Policy
220+
221+
- Admin users can attach IAM policies to users using the `IAM:AttachUserPolicy`
222+
operation.
223+
224+
Here is AWS CLI reference to attach IAM policy
225+
226+
```bash
227+
aws iam attach-user-policy --policy-arn <generated_policy_arn_from_previous_step> --user-name <tid_>
228+
```
229+
230+
Here `--user-name` can be either human user id or machine user id.
231+
207232
After the user has been authenticated successfully, the system gets the context
208233
about the current user. This context includes metadata about users like user_id,
209234
user_role (namespace_owner, regular), machine users (access keys),

0 commit comments

Comments
 (0)