← 返回命令列表

Linux command

aws-iam 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a new IAM user

aws iam create-user --user-name [my-user]

Create access keys

aws iam create-access-key --user-name [my-user]

Attach a policy

aws iam attach-user-policy --user-name [my-user] --policy-arn [arn:aws:iam::aws:policy/ReadOnlyAccess]

Create a role

aws iam create-role --role-name [my-role] --assume-role-policy-document file://[trust-policy.json]

List all users

aws iam list-users

Create a group

aws iam create-group --group-name [developers] && aws iam add-user-to-group --user-name [my-user] --group-name [developers]

Generate a credential report

aws iam generate-credential-report && aws iam get-credential-report --output text --query Content | base64 -d

说明

aws iam is the AWS CLI interface for AWS Identity and Access Management (IAM), the service for controlling access to AWS resources. IAM enables creating users, groups, roles, and policies to manage authentication and authorization. IAM is global (not region-specific) and provides fine-grained access control through JSON policies. It supports identity federation with SAML 2.0 and OIDC providers, and multi-factor authentication for enhanced security.

FAQ

What is the aws-iam command used for?

aws iam is the AWS CLI interface for AWS Identity and Access Management (IAM), the service for controlling access to AWS resources. IAM enables creating users, groups, roles, and policies to manage authentication and authorization. IAM is global (not region-specific) and provides fine-grained access control through JSON policies. It supports identity federation with SAML 2.0 and OIDC providers, and multi-factor authentication for enhanced security.

How do I run a basic aws-iam example?

Run `aws iam create-user --user-name [my-user]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more aws-iam examples?

This page includes 7 examples for aws-iam, plus related commands for nearby Linux tasks.