dcloud ec2 instances set-roleGive the instance an IAM role it gets short-lived credentials for
IAM ec2:AssociateInstanceRoleChanges state
Also needs iam:PassRole on the role.
Synopsis
dcloud ec2 instances set-role id --iam-role-name iamRoleNameArguments
<id>Requiredstring
Also accepted as
--id. Constraints: /^i-[0-9a-f]{6,32}$/
Flags
--iam-role-nameRequiredstring
IAM role the machine acts as (needs iam:PassRole on it): it gets 60-minute credentials for it through its instance identity (`ews-instance credentials`), with no key in user data
Constraints: 1-64 chars, /^[\w+=,.@-]+$/
Example
dcloud ec2 instances set-role id --iam-role-name exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.