Skip to content
GitHubXDiscordRSS

Graph

Learn how to create, update, and manage AWS Detective Graphs using Alchemy Cloud Control.

The Graph resource allows you to create and manage AWS Detective Graphs that help you visualize and analyze security-related data across your AWS environment.

Create a basic Detective Graph with auto member enabling:

import AWS from "alchemy/aws/control";
const detectiveGraph = await AWS.Detective.Graph("myDetectiveGraph", {
AutoEnableMembers: true,
Tags: [
{ Key: "Project", Value: "Security" },
{ Key: "Environment", Value: "Production" }
]
});

Configure a Detective Graph with custom tags and without auto member enabling:

const advancedDetectiveGraph = await AWS.Detective.Graph("advancedGraph", {
AutoEnableMembers: false,
Tags: [
{ Key: "Compliance", Value: "PCI-DSS" },
{ Key: "Owner", Value: "SecurityTeam" }
],
adopt: true // Allows adoption of existing resource
});

Create a Detective Graph while ensuring it adopts an existing resource if it already exists:

const existingGraph = await AWS.Detective.Graph("existingGraph", {
AutoEnableMembers: true,
Tags: [
{ Key: "Status", Value: "Active" }
],
adopt: true // Ensures the function adopts the existing graph
});