- Newest
- Most votes
- Most comments
The error you're encountering is due to the centralized Security Hub management configuration in your AWS environment. When Security Hub is centrally managed, certain operations, including enabling or disabling standards and controls, are restricted to the delegated administrator account.
CloudFormation cannot directly enable or disable Security Hub controls when central configuration is in place. This is because the central configuration policy takes precedence over individual account settings, including those attempted through CloudFormation.
In your case, even though you're trying to apply the CloudFormation template in the management account, the centralized Security Hub configuration prevents you from making these changes directly. The error message "AccessDeniedException: This account is currently associated with a central configuration policy, so only the administrator can access this operation" confirms this restriction.
To disable specific controls like IAM.6 from the AWS Foundational Security Best Practices standard in a centrally managed Security Hub environment, you need to:
- Use the delegated administrator account to create and manage configuration policies.
- Use these configuration policies to disable the specific controls you want across your organization.
Unfortunately, this process cannot be directly managed through CloudFormation templates in individual accounts when central configuration is in use. The centralized management approach is designed to ensure consistent security standards across your organization, which is why it restricts individual accounts from making these changes.
If you absolutely need to use CloudFormation to manage these settings, you might need to reconsider your Security Hub centralized management setup. However, this would impact your ability to maintain consistent security standards across your organization, so it's generally not recommended.
Sources
Disabling a control in a specific standard - AWS Security Hub
Disabling a security standard in Security Hub - AWS Security Hub
Enabling a control in a specific standard - AWS Security Hub
Relevant content
asked 3 years ago
asked 3 years ago
