-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresource.yml
43 lines (43 loc) · 1.13 KB
/
resource.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
Resources:
MainTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
TableName: ${self:custom.dynamodb.MainTable}
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
- AttributeName: PK1
AttributeType: S
- AttributeName: SK1
AttributeType: S
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
BillingMode: PAY_PER_REQUEST
GlobalSecondaryIndexes:
- IndexName: ${self:custom.dynamodb.MainTableGSI1}
KeySchema:
- AttributeName: PK1
KeyType: HASH
- AttributeName: SK1
KeyType: RANGE
Projection:
ProjectionType: ALL
S3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.s3.MediaBucket}
CorsConfiguration:
CorsRules:
- AllowedMethods:
- GET
- HEAD
AllowedOrigins:
- '*'
AllowedHeaders:
- '*'