-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
82 lines (77 loc) · 2.68 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
service: alpha-lambda-reference
custom:
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'us-east-1'}
namespace: ${self:service}-${self:custom.stage}
packageLimit: 6MB
permissions: ${file(./serverless/permissions.yml)}
alerts: ${file(./serverless/alerts.yml)}
prune:
automatic: true
number: 3
bootstrap:
file: serverless/bootstrap/data.yml
stack: ${self:custom.namespace}-bootstrap
parameters:
- ParameterKey: namespace
ParameterValue: ${self:custom.namespace}
exports:
tableName:
Fn::ImportValue: ${self:custom.namespace}-table-name
tableArn:
Fn::ImportValue: ${self:custom.namespace}-table-arn
responseBucketName:
Fn::ImportValue: ${self:custom.namespace}-response-bucket-name
sendNotificationTasksQueueArn:
Fn::ImportValue: ${self:custom.namespace}-send-notification-tasks-queue-arn
sendNotificationTasksQueueUrl:
Fn::ImportValue: ${self:custom.namespace}-send-notification-tasks-queue-url
streamArn:
Fn::ImportValue: ${self:custom.namespace}-stream-arn
streamDlqUrl:
Fn::ImportValue: ${self:custom.namespace}-stream-dlq-url
streamDlqArn:
Fn::ImportValue: ${self:custom.namespace}-stream-dlq-arn
monitoringTopicArn:
Fn::ImportValue: ${self:custom.namespace}-monitoring-topic-arn
updateVoteCountTasksQueueArn:
Fn::ImportValue: ${self:custom.namespace}-update-vote-count-tasks-queue-arn
updateVoteCountTasksQueueUrl:
Fn::ImportValue: ${self:custom.namespace}-update-vote-count-tasks-queue-url
provider:
name: aws
runtime: nodejs10.x
stage: ${self:custom.stage}
region: ${self:custom.region}
logRetentionInDays: 30
tracing: true
iamRoleStatements:
- ${self:custom.permissions.xRayWriter}
access: ${file(./serverless/access.yml)}
environment:
AWS_XRAY_CONTEXT_MISSING: LOG_ERROR
AWS_XRAY_ENABLED: ${self:provider.tracing}
NAMESPACE: ${self:custom.namespace}
RESPONSE_BUCKET_NAME: ${self:custom.bootstrap.exports.responseBucketName}
TABLE_NAME: ${self:custom.bootstrap.exports.tableName}
STREAM_DLQ_URL: ${self:custom.bootstrap.exports.streamDlqUrl}
plugins:
- serverless-plugin-common-excludes
- serverless-plugin-include-dependencies
- serverless-plugin-bootstrap
- serverless-plugin-split-stacks
- serverless-plugin-custom-roles
- serverless-plugin-package-size
- serverless-plugin-tracing
- serverless-plugin-aws-alerts
- serverless-plugin-lambda-account-access
- serverless-prune-plugin
package:
individually: true
excludeDevDependencies: false
include:
- package.json
exclude:
- ./*
- serverless/**
functions: ${file(./serverless/functions.yml)}