-
Notifications
You must be signed in to change notification settings - Fork 5.7k
/
serverless.yml
51 lines (47 loc) · 1.14 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
service: service
configValidationMode: error
provider:
name: aws
runtime: nodejs16.x
versionFunctions: false
functions:
streamDynamoDb:
handler: core.streamDynamoDb
events:
- stream:
type: dynamodb
arn:
Fn::GetAtt: [DynamoDbTable, StreamArn]
batchWindow: 10
streamKinesis:
handler: core.streamKinesis
events:
- stream:
type: kinesis
arn:
Fn::Join:
- ':'
- - arn
- aws
- kinesis
- Ref: AWS::Region
- Ref: AWS::AccountId
- stream/${self:service}-kinesis
batchSize: 100
startingPosition: TRIM_HORIZON
batchWindow: 1
resources:
Resources:
DynamoDbTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: id
AttributeType: S
BillingMode: 'PAY_PER_REQUEST'
KeySchema:
- AttributeName: id
KeyType: HASH
StreamSpecification:
StreamViewType: KEYS_ONLY
TableName: ${self:service}-table