-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
63 lines (52 loc) · 1.97 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# This file is part of the ONEMA onema Package.
# For the full copyright and license information,
# please view the LICENSE file that was distributed
# with this source code.
#
# copyright (c) 2018, Juan Manuel Torres (http://onema.io)
#
# @author Juan Manuel Torres <[email protected]>
#
service: overwatch
provider:
name: aws
runtime: java8
profile: ${opt:profile, 'default'}
timeout: 30
versionFunctions: false
memorySize: 512
stage: dev
region: us-east-1
# you can add statements to the Lambda functionArn's IAM Role here
iamRoleStatements: ${file(infrastructure/global-values.yml):iamRoleStatements}
# Service wide environment variables
environment: ${file(infrastructure/global-values.yml):environment}
# Custom values. These can be referenced in the Cloud Formation template
custom: ${file(infrastructure/global-values.yml):custom}
package:
artifact: target/scala-2.12/app.jar
functions:
# functions
log-registration:
handler: io.onema.userverless.overwatch.registration.LogRegistrationFunction::lambdaHandler
events: ${file(infrastructure/global-values.yml):loggroupEvents}
environment:
LOG_RETENTION_DAYS: 14
DESTINATION_FUNCTION: "${self:service}-${self:custom.stageName}-log-parser"
LOG_GROUP_PREFIX: "/aws/lambda"
dql-registration:
handler: io.onema.userverless.overwatch.registration.QueueRegistrationFunction::lambdaHandler
events: ${file(infrastructure/global-values.yml):lambdaCreatedEvents}
environment:
DQL_ARN:
Fn::GetAtt: [DeadLetterQueue, Arn]
log-parser:
handler: io.onema.userverless.overwatch.logs.ParserFunction::lambdaHandler
description: parses logs for metrics errors and more
reservedConcurrency: 1
# you can add CloudFormation resource templates here
resources:
Parameters: ${file(infrastructure/core-overwatch_cfn.yml):Parameters}
Resources: ${file(infrastructure/core-overwatch_cfn.yml):Resources}
Outputs: ${file(infrastructure/core-overwatch_cfn.yml):Outputs}