Hub
The Hub resource lets you manage AWS SecurityHub Hubs for centralizing security findings and compliance checks across your AWS accounts.
Minimal Example
Section titled “Minimal Example”Create a basic SecurityHub Hub with default settings and enable default standards.
import AWS from "alchemy/aws/control";
const securityHubHub = await AWS.SecurityHub.Hub("defaultSecurityHub", { EnableDefaultStandards: true, ControlFindingGenerator: "AWS"});
Advanced Configuration
Section titled “Advanced Configuration”Configure a SecurityHub Hub with automatic control enabling and specific tags for management.
const advancedSecurityHubHub = await AWS.SecurityHub.Hub("advancedSecurityHub", { EnableDefaultStandards: true, AutoEnableControls: true, Tags: { Environment: "Production", Department: "Security" }});
Adoption of Existing Resources
Section titled “Adoption of Existing Resources”If you need to adopt an existing SecurityHub Hub without failing if it already exists, you can set the adopt
property to true.
const adoptedSecurityHubHub = await AWS.SecurityHub.Hub("adoptedSecurityHub", { EnableDefaultStandards: true, adopt: true});