-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
65 lines (56 loc) · 1.28 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
service: js13kGames-bot-node18
useDotenv: true
package:
individually: true
excludeDevDependencies: false
provider:
name: aws
runtime: nodejs18.x
region: eu-west-1
stage: stage
logRetentionInDays: 14
memorySize: 256
timeout: 30
iam:
role:
statements:
- Effect: "Allow"
Action:
- "s3:PutObject"
- "s3:PutObjectAcl"
Resource:
- !Join ["/", [!GetAtt deployBucket.Arn, "*"]]
environment:
AWS_BUCKET_NAME: !Select [1, !Split [":::", !GetAtt deployBucket.Arn]]
BROWSERSTACK_KEY: ${env:BROWSERSTACK_KEY}
BROWSERSTACK_USER: ${env:BROWSERSTACK_USER}
resources:
Resources:
deployBucket:
Type: "AWS::S3::Bucket"
Properties:
WebsiteConfiguration:
IndexDocument: "index.html"
CorsConfiguration:
CorsRules:
- AllowedMethods:
- "GET"
AllowedOrigins:
- "*"
functions:
bundleAnalyzer:
package:
patterns:
- "!**/*"
- build/bundle-analyzer/index.js
handler: build/bundle-analyzer/index.handle
events:
- http: POST analyze-bundle
plugins:
- serverless-apigw-binary
custom:
apigwBinary:
types:
- "*/*"
- "multipart/form-data"
- "image/*"