AWS Identity and Access Management
CLI Reference (API Version 2010-05-08)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

iam-instanceprofilegetattributes

Description

Returns information about an instance profile. For more information about instance profiles, go to About Instance Profiles in Using AWS Identity and Access Management.

Syntax

iam-instanceprofilegetattributes -s INSTANCEPROFILENAME [ -r ]

Options

Name Description Required

-s INSTANCEPROFILENAME

The name of the instance profile you want to get information for.

Type: String

Yes

-r

Lists associated roles along with the instance profile information.

Type: String

Default: None

Optional

Output

The output lists the instance profile Amazon Resource Name (ARN) and the GUID. For information about ARNs, go to ARNs in Using AWS Identity and Access Management.

Example

The following example lists the ARN and GUID for the instance profile named myinstanceprofile.

PROMPT> iam-instanceprofilegetattributes -s myinstanceprofile

The following example lists the ARN and GUID for the instance profile named myinstanceprofile, as well as the roles associated with the instance profile.

PROMPT> iam-instanceprofilegetattributes -s myinstanceprofile -r
arn:aws:iam::123456789012:instance-profile/division_abc/subdivision_xyz/myinstanceprofile
AIPAJN3DDLPRMREXAMPLE
arn:aws:iam::123456789012:role/myrole