CmdID

CmdID / aws / aws iam

aws iam list-instance-profiles

Lists the instance profiles that have the specified path prefix. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To lists the instance profiles for the account

The following list-instance-profiles example lists the instance profiles that are associated with the current account.

aws iam list-instance-profilesIdentify
Its output, shortened
{
    "InstanceProfiles": [
        {
            "Path": "/",
            "InstanceProfileName": "example-dev-role",
            "InstanceProfileId": "AIPAIXEU4NUHUPEXAMPLE",
            "Arn": "arn:aws:iam::123456789012:instance-profile/example-dev-role",
            "CreateDate": "2023-09-21T18:17:41+00:00",
            "Roles": [
                {
                    "Path": "/",
                    "RoleName": "example-dev-role",
                    "RoleId": "AROAJ52OTH4H7LEXAMPLE",
                    "Arn": "arn:aws:iam::123456789012:role/example-dev-role",
                    "CreateDate": "2023-09-21T18:17:40+00:00",
                    "AssumeRolePolicyDocument": {
                        "Version": "2012-10-17",
                        "Statement": [
                            {
                                "Effect": "Allow",
                                "Principal": {
                                    "Service": "ec2.amazonaws.com"
                                },
                                "Action": "sts:AssumeRole"
                            }
                        ]
                    }
                }
            ]
        },
… 30 more lines

For more information, see Using instance profiles in the AWS IAM User Guide.

Options

3 in the AWS CLI reference
--markerUse this parameter only when paginating results and only after you receive a response indicating that the results are truncated.
--max-itemsUse this only when paginating results to indicate the maximum number of items you want in the response.
--path-prefixThe path prefix for filtering the results.