Skip to content

watanabeshuji/logs2sns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

logs2sns is CloudFormation template for Lambda function that notify event with email using CloudWatchLogs subscription filter.

Usage

Login to AWS management console and create CloudFormation stack with logs2sns.yml(logs2sns2.yml). See: http://dev.classmethod.jp/cloud/aws/notify-error-cloudwatch-logs-with-lambda/

Standard logs2sns

Standard logs2sns has one FilterPattern and one SNS Topic.

CloudFormation Parameters

  • FilterPattern: Log pattern to notify
  • FilterPatternExcluded: Log exclude pattern to notify
  • MailSubject: Subject of notify mail ー NotifyTopicNameWarning: SNS topic name for notify.

2way logs2sns

2way logs2sns has two set of FilterPattern and one SNS Topic. One is warning filter and other is error filter.

CloudFormation Parameters

  • ErrorFilterPattern: Error log pattern to notify
  • ErrorFilterPatternExcluded: Error log exclude pattern to notify
  • ErrorMailSubject: Subject of error notify mail ー ErrorNotifyTopicName: SNS topic name for error notify.
  • WarningFilterPattern: Warning log pattern to notify
  • WarningFilterPatternExcluded: Warning log exclude pattern to notify
  • WarningMailSubject: Subject of warning notify mail ー WarningNotifyTopicName: SNS topic name for warning notify.

How it works?

  • Create SNS Topic with email subscription.
  • Create IAM Role for Lambda function.
  • Create Lambda function process CloudWatch Logs streaming event (filter and notify email).
  • Add permission to Lambda function to invoke from CloudWatch Logs

Licence

  • The MIT License (MIT)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published