Skip to content
GitHubXDiscordRSS

ConfigurationAggregator

Learn how to create, update, and manage AWS Config ConfigurationAggregators using Alchemy Cloud Control.

The ConfigurationAggregator resource allows you to manage AWS Config ConfigurationAggregators which aggregate configuration data across multiple accounts and regions.

Create a basic ConfigurationAggregator with a name and an organization aggregation source.

import AWS from "alchemy/aws/control";
const basicAggregator = await AWS.Config.ConfigurationAggregator("basicAggregator", {
ConfigurationAggregatorName: "MyBasicAggregator",
OrganizationAggregationSource: {
RoleArn: "arn:aws:iam::123456789012:role/MyConfigRole",
SourceRegions: ["us-east-1", "us-west-2"]
}
});

Configure a ConfigurationAggregator with multiple account aggregation sources and tags.

const advancedAggregator = await AWS.Config.ConfigurationAggregator("advancedAggregator", {
ConfigurationAggregatorName: "MyAdvancedAggregator",
AccountAggregationSources: [
{
AccountIds: ["123456789012", "987654321098"],
AllRegions: true
}
],
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "ConfigAggregator" }
]
});

Create a ConfigurationAggregator that combines both organization and account aggregation sources.

const combinedAggregator = await AWS.Config.ConfigurationAggregator("combinedAggregator", {
ConfigurationAggregatorName: "MyCombinedAggregator",
AccountAggregationSources: [
{
AccountIds: ["123456789012"],
AllRegions: true
}
],
OrganizationAggregationSource: {
RoleArn: "arn:aws:iam::123456789012:role/MyConfigRole",
SourceRegions: ["us-east-1"]
}
});

If you want to adopt an existing ConfigurationAggregator without failure, use the adopt property.

const adoptAggregator = await AWS.Config.ConfigurationAggregator("adoptAggregator", {
ConfigurationAggregatorName: "MyAdoptedAggregator",
adopt: true
});