Skip to content
GitHubXDiscord

AggregationAuthorization

The AggregationAuthorization resource allows you to manage AWS Config AggregationAuthorizations that enable the aggregation of AWS Config data across multiple accounts and regions.

Create a basic AggregationAuthorization with required properties.

import AWS from "alchemy/aws/control";
const aggregationAuthorization = await AWS.Config.AggregationAuthorization("myAggregationAuthorization", {
AuthorizedAccountId: "123456789012",
AuthorizedAwsRegion: "us-west-2",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "MyProject" }
]
});

This example demonstrates how to create an AggregationAuthorization with the adoption flag set to true, indicating that you want to adopt an existing resource if it already exists.

const advancedAggregationAuthorization = await AWS.Config.AggregationAuthorization("advancedAggregationAuthorization", {
AuthorizedAccountId: "987654321098",
AuthorizedAwsRegion: "us-east-1",
Tags: [
{ Key: "Environment", Value: "Staging" },
{ Key: "Project", Value: "MyProject" }
],
adopt: true // Adopt existing resource if it exists
});

In this example, we create an AggregationAuthorization with only the required properties, demonstrating a minimal setup without any additional tags.

const minimalAggregationAuthorization = await AWS.Config.AggregationAuthorization("minimalAggregationAuthorization", {
AuthorizedAccountId: "112233445566",
AuthorizedAwsRegion: "eu-central-1"
});