-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresources.yml
62 lines (62 loc) · 1.63 KB
/
resources.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
Resources:
ChatWebsocketConnections:
Type: AWS::DynamoDB::Table
Properties:
TableName: chat-websocket-connections
AttributeDefinitions:
- AttributeName: connectionId
AttributeType: S
KeySchema:
- AttributeName: connectionId
KeyType: HASH
BillingMode: PAY_PER_REQUEST
S3ProfileImages:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.imagesBucketName}
CorsConfiguration:
CorsRules:
- AllowedMethods:
- GET
- HEAD
AllowedOrigins:
- "*"
AccessControl: PublicRead
ProfileImageBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket:
Ref: S3ProfileImages
PolicyDocument:
Statement:
- Sid: PublicReadGetObject
Effect: Allow
Principal: "*"
Action:
- s3:GetObject
Resource: arn:aws:s3:::${self:custom.imagesBucketName}/*
S3ChatData:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.chatDataBucketName}
CorsConfiguration:
CorsRules:
- AllowedMethods:
- GET
- HEAD
AllowedOrigins:
- "*"
AccessControl: PublicRead
ChatDataBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket:
Ref: S3ChatData
PolicyDocument:
Statement:
- Sid: PublicReadGetObject
Effect: Allow
Principal: "*"
Action:
- s3:GetObject
Resource: arn:aws:s3:::${self:custom.chatDataBucketName}/*