本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
AWS PCS 的 Amazon EC2 Spot 角色
如果您想要建立使用 Spot 作為其購買選項的 AWS PCS 運算節點群組,您也必須在您的 中擁有 AWSServiceRoleForEC2Spot 服務連結角色 AWS 帳戶。您可以使用下列 AWS CLI 命令來建立角色。如需詳細資訊,請參閱AWS Identity and Access Management 《 使用者指南》中的建立服務連結角色和建立角色以將許可委派給 AWS 服務。
aws iam create-service-linked-role --aws-service-name spot.amazonaws.com
注意
如果您的 AWS 帳戶 已有 IAM AWSServiceRoleForEC2Spot
角色,則會收到下列錯誤。
An error occurred (InvalidInput) when calling the CreateServiceLinkedRole operation: Service role name AWSServiceRoleForEC2Spot has been taken in this account, please try a different suffix.