/
stage.simple.yml
82 lines (73 loc) · 1.68 KB
/
stage.simple.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
functions:
aroundTheWorld:
handler: functions/aroundtheworld/handler.around_the_world
memorySize: 1024
disableLogs: false
tracing: Active
package:
exclude:
- ./**
include:
- functions/aroundtheworld/handler.py
- logs/**
events:
- stream:
arn: ${self:custom.source.streamArn}
batchWindow: 10
batchSize: 1
parallelizationFactor: 2
maximumRetryAttempts: 10
# consumer:
# 'Fn::GetAtt':
# - AroundTheWorldConsumer
# - ConsumerARN
maximumRecordAgeInSeconds: 120
startingPosition: LATEST
enabled: true
Resources:
AroundTheWorldConsumer:
Type: AWS::Kinesis::StreamConsumer
Properties:
ConsumerName: ${self:provider.stackName}-AroundTheWorldStreamConsumer
StreamARN: ${self:custom.source.streamArn}
Outputs:
SimpleOutput:
Description: Dummy Output
Value:
"whatever"
Export:
Name: "whatever-name"
lambdaPolicyXRay:
Effect: Allow
Action:
- xray:*
Resource: "*"
lambdaPolicyKinesisRead:
Effect: Allow
Action:
- kinesis:*
Resource: "*"
lambdaPolicyKinesisWrite:
Effect: Allow
Action:
- kinesis:*
Resource: "*"
lambdaPolicyKmsSource:
Effect: Allow
Action:
- kms:*
#TODO Parameterize (maybe an SSM use case here)
Resource:
- "*"
lambdaPolicyKmsSink:
Effect: Allow
Action:
- kms:*
#TODO Parameterize (maybe an SSM use case here)
Resource:
- "*"
lambdaPolicyCloudWatch:
Effect: Allow
Action:
- logs:*
Resource: "*"