Skip to content

Hub

Source: src/AWS/SecurityHub/Hub.ts

The Security Hub Hub — the account/region singleton that enables AWS Security Hub. Only one Hub can exist per region, so this is a capture-and-restore singleton: adopting a pre-existing Hub that Alchemy did not create requires --adopt.

Enable with default standards

const hub = yield* SecurityHub.Hub("Hub", {});

Enable without default standards, auto-enable controls

const hub = yield* SecurityHub.Hub("Hub", {
enableDefaultStandards: false,
autoEnableControls: true,
controlFindingGenerator: "SECURITY_CONTROL",
tags: { team: "security" },
});