通過 cloudformation 添加一個 IAM 角色,我想在其中添加一個信任策略,這樣,來自另一個 aws 賬戶的另一個 IAM 角色 (arn:aws:iam::123456789:role/otherrole) 可以擔任我的角色。但我收到錯誤“已禁止欄位資源(服務:AmazonIdentityManagement;狀態代碼:400 .....
AWSTemplateFormatVersion: "2010-09-09"
Resources:
SomeRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Resource: arn:aws:iam::123456789:role/otherrole
Action:
- 'sts:AssumeRole'
Path: /
Policies:
...
uj5u.com熱心網友回復:
AssumeRolePolicyDocument沒有Resource。它應該是Principal:
AWSTemplateFormatVersion: "2010-09-09"
Resources:
SomeRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
AWS: arn:aws:iam::123456789:role/otherrole
Action:
- 'sts:AssumeRole'
Path: /
Policies:
...
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/405036.html
標籤:
上一篇:氣流調度程式-臨時存盤-被驅逐
