A policy type has to be enabled at your organization root before you can attach a policy of that family anywhere in the organization. The landing zone enables the families it relies on for you, so there is no config file to edit for this: the organization phase (LandingZoneOrganizationStack) turns them on when it creates the organization.
The actual policies live elsewhere. Service Control Policies, declarative policies, and tag policies are defined in policies/ (Service Control Policies, Declarative Policies, and Tag Policies) and attached in organization-structure.ts.
Enabled by default
| Policy type | What it lets you attach |
|---|---|
SERVICE_CONTROL_POLICY | Service Control Policies, including every SCP the landing zone ships |
RESOURCE_CONTROL_POLICY | Resource control policies |
BACKUP_POLICY | AWS Backup policies |
DECLARATIVE_POLICY_EC2 | EC2 declarative policies, including the one the landing zone ships |
TAG_POLICY | Tag policies, including the environment tag policies the landing zone ships |
SECURITYHUB_POLICY | Security Hub configuration policies |
INSPECTOR_POLICY | Amazon Inspector policies |
GUARDDUTY_POLICY | Amazon GuardDuty policies |
Enabling a family only makes it available for attachment. It does not create or attach any policy on its own, so BACKUP_POLICY has no effect until you attach a policy of that type. DECLARATIVE_POLICY_EC2 and TAG_POLICY take effect through the policies the starter attaches. The exception is GUARDDUTY_POLICY: see Things to know.
Changing the enabled families
Pass organizationPolicyTypes into createLandingZoneStacks in src/main.ts. It is optional, and leaving it out gives you the default list above.
To keep the defaults and add a family:
createLandingZoneStacks(app, {
settings: landingZoneSettings,
organizationStructure,
alternateContacts,
organizationPolicyTypes: {
additionalPolicyTypes: [PolicyType.AISERVICES_OPT_OUT_POLICY],
},
phase: deploymentPhaseFromEnvironment(),
});
Options
organizationPolicyTypes is an OrganizationPolicyTypesProps:
| Field | Type | Required | Description |
|---|---|---|---|
policyTypes | PolicyType[] | No | Exact list of policy types to enable. When set, includeDefaults, additionalPolicyTypes, and excludePolicyTypes are ignored. |
includeDefaults | boolean | No | Start from the default policy type set. Default true. Only applies when policyTypes is omitted. |
additionalPolicyTypes | PolicyType[] | No | Policy types to add to the resolved default list. |
excludePolicyTypes | PolicyType[] | No | Policy types to remove from the resolved list. |
Use the PolicyType enum for the values (for example PolicyType.SERVICE_CONTROL_POLICY). It covers the current Organizations policy families, including newer ones such as RESOURCE_CONTROL_POLICY, SECURITYHUB_POLICY, INSPECTOR_POLICY, and GUARDDUTY_POLICY.
Things to know
GUARDDUTY_POLICYreplaces GuardDuty auto-enablement. Once the policy type is enabled, the Regional GuardDuty auto-enablement settings stop applying, even before a GuardDuty policy is attached (GuardDuty organization policies). The landing zone manages GuardDuty through organization policies, so keepGUARDDUTY_POLICYenabled. Its GuardDuty policies stay attached even with GuardDuty disabled insecurity-services.ts, so excluding the policy type makes the next deployment fail.- Keep
SERVICE_CONTROL_POLICYenabled. It is what makes the shipped SCPs and any custom SCP you attach in organization-structure.ts work. Only exclude it if you are removing SCPs from the organization entirely. - Keep
DECLARATIVE_POLICY_EC2andTAG_POLICYenabled while their policies are attached. The starter attachesBlockPublicEc2Sharingand the two environment tag policies, so excluding either type fails the deployment while those policies stay attached. EC2 declarative policies also needTrustedAccessAwsService.EC2in Trusted Access. - Enable a family before you attach a policy of that type. If you attach a backup policy while its family is off, the attachment fails at deploy time.
- Removing a policy type requires that no policies of that type are attached. AWS Organizations refuses to disable a policy family while any policy of that family is still attached anywhere in the organization, so detach them first.