-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml.dist
82 lines (71 loc) · 2.46 KB
/
serverless.yml.dist
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# 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) 2017, Juan Manuel Torres (http://onema.io)
#
# @author Juan Manuel Torres <[email protected]>
#
service: serverless-test
provider:
name: aws
runtime: java8
# profile: ${opt:profile, 'default'}
timeout: 30
versionFunctions: false
memorySize: 1024
stage: dev
region: us-east-1
# you can add statements to the Lambda function's IAM Role here
iamRoleStatements: ${file(infrastructure/global-values.yml):iamRoleStatements}
# Service wide environment variables
environment:
# This is used by the configuration providers
STAGE_NAME: ${self:custom.stageName}
# The error topic is part of the bootstrap infrastructure for uServerless
SNS_ERROR_TOPIC: ${file(infrastructure/global-values.yml):environment.SNS_ERROR_TOPIC}
# Usage plan and API keys
# apiKeys:
# - ${opt:stage}-cloud-platform-user-key
# usagePlan:
# quota:
#
# # There isn't an option to give this a custom name
# limit: 100000
# period: MONTH
# you can define service wide environment variables here
# Custom values. These can be referenced in the Cloud Formation template
custom: ${file(infrastructure/global-values.yml):custom}
# you can add packaging information here
# Make sure to run "sbt assembly" to create a jar file
# with all your dependencies and put that jar file name here.
package:
artifact: target/scala-2.12/app.jar
functions:
# API Gateway functions
success:
handler: functions.success.Function::lambdaHandler
# the DLQ is part of the bootstrap infrastructure for uServerless
onError: ${file(infrastructure/global-values.yml):deadLetterQueue}
events:
- http:
path: success
method: get
# Warmup Event
- schedule:
rate: rate(5 minutes)
input:
warmup: true
# SNS Processing functions
process:
handler: functions.process.Function::lambdaHandler
# the DLQ is part of the bootstrap infrastructure for uServerless
onError: ${file(infrastructure/global-values.yml):deadLetterQueue}
events:
- sns: ${self:custom.stageName}-processing-function
# you can add CloudFormation resource templates here
#resources:
# Parameters: ${file(infrastructure/custom-resources_cfn.yml):Parameters}
# Resources: ${file(infrastructure/custom-resources_cfn.yml):Resources}