사용자 목록 가져오기
aws iam list-users
Shell
복사
새 사용자 생성하기
aws iam create-user --user-name <UserName>
Shell
복사
사용자 액세스키 만들기
aws iam create-access-key --user-name <UserName>
Shell
복사
역할 Trust Policy 업데이트
aws iam update-assume-role-policy \
--role-name <RoleName> \
--policy-document file://trust-policy-release.json
Shell
복사
역할 생성하기
aws iam create-role --role-name <RoleName> \
--assume-role-policy-document file://trust-policy.json
Shell
복사
역할 ARN 가져오기
aws iam list-roles --query "Roles[?RoleName=='<RoleName>'].Arn" --output text
Shell
복사
역할에 인라인 정책 부여하기
aws iam put-role-policy --role-name <RoleName> --policy-name <PolicyName> --policy-document file://policy.json
Shell
복사
역할에 관리형 정책 부여하기
aws iam attach-role-policy --policy-arn <PolicyARN> --role-name <RoleName>
Shell
복사
정책 생성하기
aws iam create-policy --policy-name <PolicyName> --policy-document file://<PolicyName>.json
Shell
복사
정책 ARN 가져오기
aws iam list-policies --query "Policies[?PolicyName=='<PolicyName>'].Arn" --output text
Shell
복사
정책 생성 및 정책 ARN 가져오기
aws --region <Region> --query Policy.Arn --output text iam create-policy --policy-name <PolicyName> --policy-document file://<PolicyName>.json)
Shell
복사

