# InstanceProfileAttributes

Attributes of an Instance Profile.

- Source: [`aws-iam/lib/instance-profile.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-iam/lib/instance-profile.ts#L71)
- Type last changed: v2.88.0 · 20 Jul 2023

## Example

```ts
const role = new iam.Role(this, 'Role', {
  assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
});

const instanceProfile = iam.InstanceProfile.fromInstanceProfileAttributes(this, 'ImportedInstanceProfile', {
  instanceProfileArn: 'arn:aws:iam::account-id:instance-profile/MyInstanceProfile',
  role,
});
```

## Properties

- `instanceProfileArn`: string (required) — The ARN of the InstanceProfile.

  Format: arn:<partition>:iam::<account-id>:instance-profile/<instance-profile-name-with-path>

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The role associated with the InstanceProfile.

  **Default:** no role
