Skip to content
GitHubXDiscordRSS

AwsLogSource

Learn how to create, update, and manage AWS SecurityLake AwsLogSources using Alchemy Cloud Control.

The AwsLogSource resource lets you manage AWS SecurityLake AwsLogSources for integrating log data from various AWS accounts and services into AWS Security Lake.

Create a basic AwsLogSource with required properties and a couple of common optional ones.

import AWS from "alchemy/aws/control";
const logSource = await AWS.SecurityLake.AwsLogSource("myLogSource", {
SourceName: "MyLogSource",
SourceVersion: "1.0",
Accounts: ["123456789012", "987654321098"],
DataLakeArn: "arn:aws:securitylake:us-east-1:123456789012:data-lake"
});

Configure an AwsLogSource with existing resource adoption.

const advancedLogSource = await AWS.SecurityLake.AwsLogSource("advancedLogSource", {
SourceName: "AdvancedLogSource",
SourceVersion: "1.1",
Accounts: ["123456789012"],
DataLakeArn: "arn:aws:securitylake:us-east-1:123456789012:data-lake",
adopt: true // Adopts an existing resource instead of failing
});

Create an AwsLogSource that pulls logs from multiple AWS accounts.

const multiAccountLogSource = await AWS.SecurityLake.AwsLogSource("multiAccountLogSource", {
SourceName: "MultiAccountLogSource",
SourceVersion: "1.2",
Accounts: ["123456789012", "234567890123", "345678901234"],
DataLakeArn: "arn:aws:securitylake:us-east-1:123456789012:data-lake"
});

Demonstrate updating an existing AwsLogSource with a new version.

const updatedLogSource = await AWS.SecurityLake.AwsLogSource("existingLogSource", {
SourceName: "ExistingLogSource",
SourceVersion: "1.3", // Updated version
Accounts: ["123456789012"],
DataLakeArn: "arn:aws:securitylake:us-east-1:123456789012:data-lake"
});