-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yml
More file actions
104 lines (98 loc) · 2.68 KB
/
template.yml
File metadata and controls
104 lines (98 loc) · 2.68 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: "@Moicky/dynamodb"
Resources:
DefaultDynamoDBTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
SecondDynamoDBTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: bookId
KeyType: HASH
AttributeDefinitions:
- AttributeName: bookId
AttributeType: S
TableWithGSIs:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
- AttributeName: author
AttributeType: S
- AttributeName: stars
AttributeType: N
GlobalSecondaryIndexes:
- IndexName: booksByAuthor
KeySchema:
- AttributeName: author
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
Projection:
ProjectionType: ALL
- IndexName: booksByStars
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: stars
KeyType: RANGE
Projection:
ProjectionType: ALL
PlaygroundTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
Outputs:
DefaultTableArn:
Description: "DynamoDB Table Arn for tests"
Value: !Ref DefaultDynamoDBTable
SecondTableArn:
Description: "DynamoDB Table Arn for tests"
Value: !Ref SecondDynamoDBTable
TableWithGSIsArn:
Description: "DynamoDB Table Arn for tests"
Value: !Ref TableWithGSIs
PlaygroundTableArn:
Description: "DynamoDB Table Arn for tests"
Value: !Ref PlaygroundTable