Created
June 17, 2019 18:01
-
-
Save alexcasalboni/d18ae0c5c721ec19f3a77df834c61178 to your computer and use it in GitHub Desktop.
CloudWatch Logs - serverless app for logs processing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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