View a markdown version of this page

AssumeRoleAccessDenied - AWS SimSpace Weaver

終止支援通知: 將於 2026 AWS 年 5 月 20 日結束對 的支援 AWS SimSpace Weaver。2026 年 5 月 20 日之後,您將無法再存取 SimSpace Weaver 主控台或 SimSpace Weaver 資源。如需詳細資訊,請參閱AWS SimSpace Weaver 終止支援

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

AssumeRoleAccessDenied

如果您的模擬無法啟動,您可能會收到下列錯誤:

Unable to assume role arn:aws:iam::111122223333:role/weaver-project-name-app-role; verify the role exists and has trust policy on SimSpace Weaver

如果下列有關模擬的 AWS Identity and Access Management (IAM) 角色的其中一項為 true,則可能會收到此錯誤:

  • Amazon Resource Name (ARN)是指不存在的 IAM 角色。

  • 不允許新模擬名稱擔任角色之 IAM 角色的信任政策。

檢查 以確定角色存在。如果角色存在,請檢查角色的信任政策。下列範例信任政策aws:SourceArn中的 僅允許名稱開頭MySimulation為 的模擬 (在帳戶 111122223333 中) 擔任角色。

JSON
{ "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "simspaceweaver.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "ArnLike": { "aws:SourceArn": "arn:aws:simspaceweaver:us-west-2:111122223333:simulation/MySimulation*" } } } ] }

若要允許名稱開頭為 MyOtherSimulation 的另一個模擬擔任角色,必須修改信任政策,如下列已編輯的範例所示:

JSON
{ "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "simspaceweaver.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "ArnLike": { "aws:SourceArn": [ "arn:aws:simspaceweaver:us-west-2:111122223333:simulation/MySimulation*", "arn:aws:simspaceweaver:us-west-2:111122223333:simulation/MyOtherSimulation*" ] } } } ] }