forked from alexdebrie/serverless-dynamodb-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
41 lines (37 loc) · 938 Bytes
/
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
service: serverless-dynamodb-scanner
custom:
dynamodbTableArn: ''
kinesisStreamArn: ''
provider:
name: aws
runtime: python3.7
stage: dev
region: us-east-1
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:Scan"
Resource: ${self:custom.dynamodbTableArn}
- Effect: "Allow"
Action:
- "kinesis:PutRecords"
Resource: ${self:custom.kinesisStreamArn}
- Effect: "Allow"
Action:
- "ssm:GetParameter"
- "ssm:PutParameter"
Resource: 'arn:aws:ssm:*:*:parameter/ddbScanner/lastEvaluatedKey'
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
Resource: "arn:aws:lambda:*:*:function:ScannerLambdaFunction"
environment:
TABLE_ARN: ${self:custom.dynamodbTableArn}
STREAM_ARN: ${self:custom.kinesisStreamArn}
packaging:
exclude:
- example/**
functions:
scanner:
handler: handler.scanner
timeout: 900