-
Notifications
You must be signed in to change notification settings - Fork 24
/
serverless.yml
46 lines (37 loc) · 1.15 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
service:
name: ${file(./modules/sanitizeStackName.js):sanitize}
plugins:
- serverless-s3-sync
- serverless-pseudo-parameters
- serverless-stack-output
- serverless-cloudfront-invalidate
custom:
# The domain name to be used
domainName: ${opt:domain}
# Output plugin configuration
output:
handler: modules/output.handler
# CloudFront invalidation plugin configuration
cloudfrontInvalidate:
distributionIdKey: 'CloudFrontDistributionId'
items: # Add your files to invalidate here:
- '/index.html'
# S3 sync plugin configuration
s3Sync:
- bucketName: ${opt:domain}
localDir: src
provider:
name: aws
runtime: nodejs8.10
region: ${opt:region, 'us-east-1'}
resources:
- ${file(resources/custom-acm-certificate-lambda.yml)}
- ${file(resources/custom-acm-certificate-lambda-role.yml)}
- ${file(resources/cloudfront-origin-access-identity.yml)}
- ${file(resources/s3-bucket.yml)}
- ${file(resources/s3-policies.yml)}
- ${file(resources/hosted-zone.yml)}
- ${file(resources/dns-records.yml)}
- ${file(resources/certificate.yml)}
- ${file(resources/cf-distribution.yml)}
- ${file(resources/outputs.yml)}