Difference between revisions of "Aws iam list-roles"
Jump to navigation
Jump to search
(16 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
<code>[[aws iam]] list-roles</code> | <code>[[aws iam]] list-roles</code> | ||
<code>[[aws iam]] list-roles | grep Arn</code> | <code>[[aws iam]] list-roles | grep Arn</code> | ||
+ | <code>[[aws iam]] list-roles | grep [[RoleName]]</code> | ||
+ | <code>[[aws iam]] list-roles --output text | grep ROLES</code> | ||
+ | |||
+ | == Examples == | ||
<code>[[aws iam]] list-roles | grep RoleName</code> | <code>[[aws iam]] list-roles | grep RoleName</code> | ||
− | + | "RoleName": "[[AWSServiceRoleForOrganizations]]", | |
+ | "RoleName": "AWSServiceRoleForSupport", | ||
+ | "RoleName": "AWSServiceRoleFor[[TrustedAdvisor]]", | ||
+ | "RoleName": "[[OrganizationAccountAccessRole]]", | ||
Line 10: | Line 17: | ||
"RoleName": "AWSServiceRoleForOrganizations", | "RoleName": "AWSServiceRoleForOrganizations", | ||
"RoleName": "AWSServiceRoleForSupport", | "RoleName": "AWSServiceRoleForSupport", | ||
+ | "RoleName": "AWSServiceRoleForAccessAnalyzer", | ||
+ | "RoleName": "[[OrganizationAccountAccessRole]]", | ||
+ | "RoleName": "[[AWSServiceRoleForAmazonEKS]]", | ||
+ | "RoleName": "[[AWSServiceRoleForAmazonEKSNodegroup]]", | ||
+ | "RoleName": "[[AWSServiceRoleForAutoScaling]]", | ||
+ | "RoleName": "AWSServiceRoleForRDS", | ||
"RoleName": "AWSServiceRoleFor[[TrustedAdvisor]]", | "RoleName": "AWSServiceRoleFor[[TrustedAdvisor]]", | ||
+ | "RoleName": "eksctl-YOUR_CLUSTER1-prod-cluster-[[ServiceRole]]-EZ64N75VT335", | ||
+ | "RoleName": "eksctl-YOUR_CLUSTER1-prod-nodegroup-standar-[[NodeInstanceRole]]-KOHNE2ZI0adfaDE", | ||
+ | |||
+ | <code>[[aws iam]] list-roles | grep RoleName</code> | ||
+ | "RoleName": "AWSReservedSSO_AdministratorAccess_xxxxx", | ||
+ | "RoleName": "AWSReservedSSO_ViewOnlyAccess_xxxxxx", | ||
+ | "RoleName": "[[AWSServiceRoleForAmazonGuardDuty]]", | ||
+ | "RoleName": "[[AWSServiceRoleForAmazonInspector2]]", | ||
+ | "RoleName": "[[AWSServiceRoleForCloudTrail]]", | ||
+ | "RoleName": "[[AWSServiceRoleForOrganizations]]", | ||
+ | "RoleName": "[[AWSServiceRoleForSecurityHub]]", | ||
+ | "RoleName": "[[AWSServiceRoleForSSO]]", | ||
+ | "RoleName": "[[AWSServiceRoleForSupport]]", | ||
+ | "RoleName": "[[AWSServiceRoleForTrustedAdvisor]]", | ||
"RoleName": "[[OrganizationAccountAccessRole]]", | "RoleName": "[[OrganizationAccountAccessRole]]", | ||
== Related == | == Related == | ||
* [[Terraform]]: <code>[[aws_iam_role]]</code> | * [[Terraform]]: <code>[[aws_iam_role]]</code> | ||
− | * <code>[[aws iam get-role]]</code> | + | * <code>[[aws iam get-role --role-name]]</code> |
+ | * <code>for ROLE in $(aws iam list-roles); do aws iam get-role --role-name ROLE; done</code> | ||
* <code>[[aws list all]]</code> | * <code>[[aws list all]]</code> | ||
+ | * [[Switch role]]: <code>[[OrganizationAccountAccessRole]]</code> | ||
+ | * [[Datadog]]: [[DatadogAWSIntegrationRole]] | ||
== See also == | == See also == | ||
− | * {{aws iam | + | * {{aws iam roles}} |
− | |||
[[Category:AWS]] | [[Category:AWS]] |
Latest revision as of 16:45, 10 October 2024
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/list-roles.html
aws iam list-roles
aws iam list-roles | grep Arn
aws iam list-roles | grep RoleName
aws iam list-roles --output text | grep ROLES
Examples[edit]
aws iam list-roles | grep RoleName
"RoleName": "AWSServiceRoleForOrganizations",
"RoleName": "AWSServiceRoleForSupport",
"RoleName": "AWSServiceRoleForTrustedAdvisor",
"RoleName": "OrganizationAccountAccessRole",
aws iam list-roles | grep RoleName
"RoleName": "AWSServiceRoleForOrganizations",
"RoleName": "AWSServiceRoleForSupport",
"RoleName": "AWSServiceRoleForAccessAnalyzer",
"RoleName": "OrganizationAccountAccessRole",
"RoleName": "AWSServiceRoleForAmazonEKS",
"RoleName": "AWSServiceRoleForAmazonEKSNodegroup",
"RoleName": "AWSServiceRoleForAutoScaling",
"RoleName": "AWSServiceRoleForRDS",
"RoleName": "AWSServiceRoleForTrustedAdvisor",
"RoleName": "eksctl-YOUR_CLUSTER1-prod-cluster-ServiceRole-EZ64N75VT335",
"RoleName": "eksctl-YOUR_CLUSTER1-prod-nodegroup-standar-NodeInstanceRole-KOHNE2ZI0adfaDE",
aws iam list-roles | grep RoleName
"RoleName": "AWSReservedSSO_AdministratorAccess_xxxxx",
"RoleName": "AWSReservedSSO_ViewOnlyAccess_xxxxxx",
"RoleName": "AWSServiceRoleForAmazonGuardDuty",
"RoleName": "AWSServiceRoleForAmazonInspector2",
"RoleName": "AWSServiceRoleForCloudTrail",
"RoleName": "AWSServiceRoleForOrganizations",
"RoleName": "AWSServiceRoleForSecurityHub",
"RoleName": "AWSServiceRoleForSSO",
"RoleName": "AWSServiceRoleForSupport",
"RoleName": "AWSServiceRoleForTrustedAdvisor",
"RoleName": "OrganizationAccountAccessRole",
Related[edit]
- Terraform:
aws_iam_role
aws iam get-role --role-name
for ROLE in $(aws iam list-roles); do aws iam get-role --role-name ROLE; done
aws list all
- Switch role:
OrganizationAccountAccessRole
- Datadog: DatadogAWSIntegrationRole
See also[edit]
- AWS IAM role, AWS service roles, AWS IAM Roles Anywhere: [
list-roles | get-role | create-role | put-role-policy | create-service-linked-role | attach-role-policy | update-role | add-role-to-instance-profile ], aws ec2 describe-iam-instance-profile-associations ]
, IAM roles for EC2 instances,AWSServiceRoleForAutoScaling
Advertising: