Skip to main content

AWS CloudTrail log collection via SNS trigger

Warning

The legacy Coralogix-CloudTrail-via-SNS SAR app is deprecated. For new deployments, use the unified Coralogix AWS Shipper, which supports CloudTrail-via-SNS through its IntegrationType and SNSTopicArn parameters. Its parameter set differs from the legacy app described below. See the coralogix-aws-shipper repository for the current reference. These instructions will be migrated in a follow-up.

Forward your CloudTrail logs to Coralogix without writing any shipper code. A predefined Lambda function subscribes to the SNS topic your CloudTrail bucket notifies, reads each new object, and sends its contents to Coralogix.

What you need

  • An active CloudTrail account.
  • An SNS topic with SNS:Publish permission to the bucket.
  • A CloudTrail S3 bucket with event notifications configured to that SNS topic.
  • AWS permissions to create Lambda functions and IAM roles.
  • A Coralogix Send-Your-Data API key.

Deploy the Lambda function

1.
Open the application

Go to the Coralogix AWS Shipper application page in the AWS Serverless Application Repository.

2.
Fill in the parameters

Complete the required parameters, using the table below.

3.
Deploy

Select Deploy.

Parameters

ParameterDescription
Application NameStack name of the application created through AWS CloudFormation
ApplicationNameApplication name as seen in the Coralogix UI
SubsystemNameSubsystem name as seen in the Coralogix UI
NotificationEmailAddress that receives an SNS notification if the Lambda fails. Requires a working SNS topic with a validated domain
SnsKmsKeyArnOptional KMS key ARN (not an alias) encrypting the Lambda failure-notification SNS topic. Leave empty for no encryption. The key policy must allow sns.amazonaws.com and the Lambda execution role to use kms:Decrypt and kms:GenerateDataKey*
S3BucketNameName of the S3 bucket holding the CloudTrail logs. Must be in the same region as the stack you create
SNSTopicARNARN of the SNS topic. Must be in the same region as the S3 bucket
CoralogixRegionRegion associated with your Coralogix domain
FunctionArchitectureLambda function architecture. x86_64 or arm64
FunctionMemorySizeMaximum memory the Lambda may consume. Leave at the default of 1024
FunctionTimeoutMaximum seconds the function may run. Leave at the default of 300
PrivateKeyYour Coralogix Send-Your-Data API key
Note

Leave FunctionMemorySize and FunctionTimeout at their defaults. The function is sized for the volume CloudTrail produces.

Last updated on