我目前正在尝试为我创建的所有配置规则创建一个聚合器,以便客户端有一个集中的位置来查看所有区域配置指标。
这是我创建 configAggregator 的代码:
//adding role for configAggregator
const configAggregatorRole = new iam.Role(this, 'configAggregatorRole' ,{
assumedBy: new iam.ServicePrincipal('config.amazonaws.com')
});
configAggregatorRole.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSConfigRoleforOrganizations'));
configAggregatorRole.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('ReadOnlyAccess'));
//adding a content aggregator for managed config rules below
const globalConfigAggregator = new config.CfnConfigurationAggregator(this, 'globalConfigAggregator',{
configurationAggregatorName: 'globalConfigAggregator',
AccountAggregationSourceProperty: {
accountIds : this.account
}
});
}
}
我目前正试图弄清楚我应该传递什么来指定我希望这个帐户和 x 区域成为该帐户中所有区域中所有配置规则的聚合视图。我不知道该怎么做。谢谢!