1**To create an instance profile** 2 3The following ``create-instance-profile`` command creates an instance profile named ``Webserver``:: 4 5 aws iam create-instance-profile --instance-profile-name Webserver 6 7Output:: 8 9 { 10 "InstanceProfile": { 11 "InstanceProfileId": "AIPAJMBYC7DLSPEXAMPLE", 12 "Roles": [], 13 "CreateDate": "2015-03-09T20:33:19.626Z", 14 "InstanceProfileName": "Webserver", 15 "Path": "/", 16 "Arn": "arn:aws:iam::123456789012:instance-profile/Webserver" 17 } 18 } 19 20To add a role to an instance profile, use the ``add-role-to-instance-profile`` command. 21 22For more information, see `Using IAM Roles to Delegate Permissions to Applications that Run on Amazon EC2`_ in the *Using IAM* guide. 23 24.. _`Using IAM Roles to Delegate Permissions to Applications that Run on Amazon EC2`: http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-usingrole-ec2instance.html