-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
77 lines (73 loc) · 2.09 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
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
service: dynamo-bao-table
frameworkVersion: "3"
useDotenv: true
provider:
name: aws
runtime: nodejs20.x
region: ${env:AWS_REGION, 'us-west-2'}
stage: ${opt:stage, 'dev'}
resources:
Resources:
MainTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${env:TABLE_NAME}
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: _pk
AttributeType: S
- AttributeName: _sk
AttributeType: S
- AttributeName: _gsi1_pk
AttributeType: S
- AttributeName: _gsi1_sk
AttributeType: S
- AttributeName: _gsi2_pk
AttributeType: S
- AttributeName: _gsi2_sk
AttributeType: S
- AttributeName: _gsi3_pk
AttributeType: S
- AttributeName: _gsi3_sk
AttributeType: S
- AttributeName: _gsi_test_id
AttributeType: S
KeySchema:
- AttributeName: _pk
KeyType: HASH
- AttributeName: _sk
KeyType: RANGE
GlobalSecondaryIndexes:
- IndexName: gsi1
KeySchema:
- AttributeName: _gsi1_pk
KeyType: HASH
- AttributeName: _gsi1_sk
KeyType: RANGE
Projection:
ProjectionType: ALL
- IndexName: gsi2
KeySchema:
- AttributeName: _gsi2_pk
KeyType: HASH
- AttributeName: _gsi2_sk
KeyType: RANGE
Projection:
ProjectionType: ALL
- IndexName: gsi3
KeySchema:
- AttributeName: _gsi3_pk
KeyType: HASH
- AttributeName: _gsi3_sk
KeyType: RANGE
Projection:
ProjectionType: ALL
- IndexName: gsi_test
KeySchema:
- AttributeName: _gsi_test_id
KeyType: HASH
Projection:
ProjectionType: ALL
TimeToLiveSpecification:
AttributeName: ttl
Enabled: true