-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
42 lines (39 loc) · 1.06 KB
/
serverless.yml
File metadata and controls
42 lines (39 loc) · 1.06 KB
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
service: zaptalk-logger-microservice
plugins:
- serverless-pseudo-parameters
custom:
secrets: ${file(secrets.json)}
provider:
name: aws
runtime: nodejs10.x
stage: dev
region: ${self:custom.secrets.aws.region}
memorySize: 128
tracing:
lambda: true
environment:
accountId: ${self:custom.secrets.aws.accountId}
region: ${self:custom.secrets.aws.region}
dynamoTable: ${self:custom.secrets.aws.dynamoTable}
iamRoleStatements:
- Effect: "Allow"
Resource: "*"
Action:
- "sns:*"
- Effect: Allow
Action:
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:PutItem
Resource: "arn:aws:dynamodb:${self:custom.secrets.aws.region}:*:*"
functions:
logger:
handler: logger.handle
events:
- sns: ${self:custom.secrets.aws.snsTopicToListen}
onError: arn:aws:sns:#{AWS::Region}:#{AWS::AccountId}:${self:custom.secrets.aws.snsTopicErrorHandling}
error:
handler: error.handle
events:
- sns: ${self:custom.secrets.aws.snsTopicErrorHandling}