Open topic with navigation

# Creating an Instance Profile

To create an instance profile:

1. Run the following command:
   `aws iam create-instance-profile \
   --instance-profile-name <Workernodes Instance profile name>`
2. Record your assigned worker node's instance profile name in the AWS worksheet. In our example we will use `srgdemo-workernodes-instance-profile`. The command will return a description of the newly-created instance profile. For example:

    {
       "InstanceProfile":{
          "InstanceProfileId":"AIPAJMBYC7DLSPEXAMPLE",
          "Roles":[

          ],
          "CreateDate":"2015-03-09T20:33:19.626Z",
          "InstanceProfileName":"Webserver",
          "Path":"/",
          "Arn":"arn:aws:iam::123456789012:instance-profile/Webserver"
       }
    }

1. Record the Arn value in the AWS Worksheet as `Workernodes Instance profile ARN.`

1. Run the following command to add the role to the instance profile:
   `aws iam add-role-to-instance-profile \
   --instance-profile-name <Workernodes Instance profile name> \
   --role-name <Workernodes role name>`

Where:

`<Workernodes Instance profile name>`: Use the instance profile name created above or by your AWS infrastructure administrators and recorded in the AWS worksheet. For example, `srgdemo-workernodes-instance-profile.`

`<Workernodes role name>:` Use the role name created by your AWS infrastructure administrators and recorded in the AWS worksheet. For example, `srgdemo-workernodes-svc-role.`

Example:
`aws iam add-role-to-instance-profile --instance-profile-name srgdemo-workernodes-instance-profile --role-name srgdemo-workernodes-svc-role`

The command has no output.

Next Step: Create and Configure a Launch Template