2017-08-15 180 views
0

我有2個aws帳戶,我可以使用terraform爲第一個帳戶設置aws集成,但是當我嘗試爲我的第二個帳戶創建aws集成時,我出現錯誤Datadog AWS集成多個aws帳戶

我已經創建了一個內聯策略角色,我們沒有設置交叉賬戶。

! Datadog is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::xxxxxxxxxx:role/DatadogAWSIntegrationRole. See http://docs.datadoghq.com/integrations/aws/ 

信任關係:

{ 
    "Version": "2012-10-17", 
    "Statement": [ 
    { 
     "Effect": "Allow", 
     "Principal": { 
     "AWS": "arn:aws:iam::xxxxxxxxxxxx:root" 
     }, 
     "Action": "sts:AssumeRole", 
     "Condition": { 
     "StringEquals": { 
      "sts:ExternalId": "xxxxxxxxxxxxxxxxxxxxxxxxxx" 
     } 
     } 
    } 
    ] 
} 

任何人都可以請指導我如何解決這個問題?

+1

我不知道,你可以使用terraform成立Datadog AWS集成(我在正確理解你的問題? )。但是,您不應該有任何麻煩將多個AWS賬戶添加到您的Datadog AWS集成中。應該從一個帳戶向另一個帳戶工作。 [你見過這部分指南](https://docs.datadoghq.com/integrations/aws/#installation)? – stephenlechner

+0

是的,我沒有爲這兩個帳戶設置跨賬戶訪問權限,datadog建議,可能是這個問題我不確定 – Swat

回答

2

角色arn:aws:iam :: xxxxxxxxxx:角色/ DatadogAWSIntegrationRole還必須具有在另一個帳戶上承擔角色的權限。

你必須更新主帳戶DatadogAWSIntegrationRole包括:

{ 
"Version": "2012-10-17", 
"Statement": [ 
       ... 
       { 
        "Effect": "Allow", 
        "Action": "sts:AssumeRole", 
        "Resource": "arn:aws:iam::xxxxxxxxxxxx:role/AssumedRoleForDataDogInOtherAccount" 
       } 
      ] 
}