-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathserverless.yml
45 lines (41 loc) · 997 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
42
43
44
45
service: KP1
frameworkVersion: "3"
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: us-east-1
plugins:
- serverless-iam-roles-per-function
functions:
KP1Consumer:
handler: functions/consumer.handler
iamRoleStatements:
- Effect: "Allow"
Action:
- kinesis:DescribeStream
- kinesis:DescribeStreamSummary
- kinesis:GetRecords
- kinesis:GetShardIterator
- kinesis:ListShards
- kinesis:ListStreams
- kinesis:SubscribeToShard
Resource: !GetAtt KP1DataStream.Arn
events:
- stream:
type: kinesis
arn: !GetAtt KP1DataStream.Arn
batchSize: 10
batchWindow: 10
resources:
Resources:
KP1DataStream:
Type: AWS::Kinesis::Stream
Properties:
ShardCount: 1
StreamModeDetails:
StreamMode: PROVISIONED
Outputs:
Output:
Description: "Kinesis stream name"
Value: !Ref KP1DataStream