| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Creates a new instance profile in your AWS account. Optionally adds a role to the instance profile.
For more information about instance profiles, see About Instance Profiles in Using AWS Identity and Access Management. Working with roles is described in Working with Roles.
iam-instanceprofilecreate [-p
PATH
| -r ROLENAME] -s
INSTANCEPROFILENAME
| Name | Description | Required |
|---|---|---|
|
|
Path to the instance profile. For more information about paths, go to Identifiers for IAM Entities in Using AWS Identity and Access Management. If you don't want the instance profile to have a path, set to /. Type: String Constraints: See Appendix A: Limitations on IAM Entities. Default: / |
No |
|
|
The name of the role to add to the instance profile. Type: String Default: None |
Optional |
|
|
Name of the instance profile. Type: String Constraints: See Appendix A: Limitations on IAM Entities. Default: None |
Yes |
The output lists the Amazon Resource Name (ARN) for the instance profile. For more information about ARNs, see ARNs in Using AWS Identity and Access Management.
The following example creates an instance profile named myinstanceprofile with
no path. You could omit the -p option and get
the same result.
PROMPT> iam-instanceprofilecreate -s myinstanceprofile -p /
arn:aws:iam::123456789012:instance-profile/myinstanceprofileThe following example creates an instance profile named myinstanceprofile with a path of /division_abc/subdivision_xyz/, and adds a previously created role named myrole.
PROMPT> iam-instanceprofilecreate -s myinstanceprofile -p /division_abc/subdivision_xyz/ -r myrole
arn:aws:iam::123456789012:instance-profile/division_abc/subdivision_xyz/myinstanceprofile