Skip to content
GitHubXDiscord

EnabledControl

The EnabledControl resource allows you to manage AWS ControlTower EnabledControls in your AWS environment. This resource enables you to specify controls to be enforced on accounts within your organization.

Create an EnabledControl with required properties and one optional parameter.

import AWS from "alchemy/aws/control";
const enabledControl = await AWS.ControlTower.EnabledControl("myEnabledControl", {
ControlIdentifier: "aws-control-sample-control",
TargetIdentifier: "account-123456789012",
Parameters: [
{
parameterKey: "sampleParameter",
parameterValue: "sampleValue"
}
]
});

Configure an EnabledControl with additional parameters and tags for better organization.

const advancedEnabledControl = await AWS.ControlTower.EnabledControl("advancedEnabledControl", {
ControlIdentifier: "aws-control-sample-control",
TargetIdentifier: "account-098765432109",
Parameters: [
{
parameterKey: "sampleParameter",
parameterValue: "advancedSampleValue"
},
{
parameterKey: "anotherParameter",
parameterValue: "anotherSampleValue"
}
],
Tags: [
{
Key: "Environment",
Value: "Production"
},
{
Key: "Department",
Value: "Finance"
}
],
adopt: true
});

Adopt an existing control without failing if it already exists.

const adoptExistingControl = await AWS.ControlTower.EnabledControl("adoptExistingControl", {
ControlIdentifier: "aws-control-sample-control",
TargetIdentifier: "account-112233445566",
adopt: true
});

Create an EnabledControl with custom control parameters tailored to specific needs.

const customParamControl = await AWS.ControlTower.EnabledControl("customParamControl", {
ControlIdentifier: "aws-control-compliance-control",
TargetIdentifier: "account-556677889900",
Parameters: [
{
parameterKey: "complianceLevel",
parameterValue: "high"
},
{
parameterKey: "auditFrequency",
parameterValue: "monthly"
}
],
Tags: [
{
Key: "Compliance",
Value: "High"
}
]
});