CloudTrail SNS notification topic not configured

Connect an SNS topic when log-file delivery notifications are needed.

Description

Use CloudTrail SNS notifications to trigger processing when log files reach S3. Monitor individual events in the logs separately.

Potential impact

A downstream job that waits for SNS may never start if its topic or subscription is missing.

Remediation

If your workflow needs notifications, set SnsTopicName to the receiving topic, allow CloudTrail to publish in the topic policy, and subscribe the consumer. Confirm that a newly delivered file triggers a notification.

Examples

The second template sends file-delivery notifications from this multi-Region trail to Topic.TopicName. Define the referenced Topic and its subscription separately.

Before

yaml
Resources:
  Trail:
    Type: AWS::CloudTrail::Trail
    Properties:
      S3BucketName: !Ref LogBucket
      IsLogging: true
      IsMultiRegionTrail: true

After

yaml
Resources:
  Trail:
    Type: AWS::CloudTrail::Trail
    Properties:
      S3BucketName: !Ref LogBucket
      SnsTopicName: !GetAtt Topic.TopicName
      IsLogging: true
      IsMultiRegionTrail: true

References