Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CloudWatch Logs - serverless app for logs processing
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
MyProcessingFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: python3.7
Policies:
- AWSLambdaExecute # Managed Policy
- Version: '2012-10-17' # Policy Document
Statement:
- Effect: Allow
Action:
- logs:GetLogEvents
Resource: arn:aws:logs:::log-group:my-log-group
Events:
LogsSubscription:
Type: CloudWatchLogs
Properties:
LogGroupName: my-log-group
FilterPattern: ERROR
# ...
# all the other properties here
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.