This repository was archived by the owner on Dec 4, 2020. It is now read-only.
forked from bdrobinson/ccm-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
85 lines (80 loc) · 2.29 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
service:
name: ccm_rss
plugins:
- serverless-webpack
custom:
webpack:
includeModules: true
provider:
name: aws
runtime: nodejs8.10
region: eu-west-2
stage: ${opt:stage, 'dev'}
stackName: ccm-rss-${self:provider.stage}
apiName: ccm-rss-apigateway-${self:provider.stage}
memorySize: 512
resources:
Resources:
CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Comment: CCM Sermons RSS Distribution
DefaultCacheBehavior:
TargetOriginId: CCMSermonsRSSOrigin
ViewerProtocolPolicy: 'redirect-to-https'
DefaultTTL: 30
ForwardedValues:
QueryString: false
Enabled: true
Origins:
- Id: CCMSermonsRSSOrigin
DomainName:
Fn::Join:
- "."
- - Ref: ApiGatewayRestApi
- execute-api
- ${self:provider.region}
- amazonaws.com
OriginPath: /prod
CustomOriginConfig:
OriginProtocolPolicy: https-only
functions:
sermons-rss:
handler: src/sermons.get
name: ${self:provider.stage}-sermons-rss
description: Serves the main CCM Sermons RSS feed.
environment:
GRAPHQL_ENDPOINT: https://api.graph.cool/simple/v1/cjkqvvoxy2pyy0175cdmdy1mz
timeout: 60
events:
- http:
method: get
path: /
sermons-rss-head:
handler: src/sermons.head
name: ${self:provider.stage}-sermons-rss-head
description: Serves the HEAD request for the main CCM Sermons RSS feed.
environment:
GRAPHQL_ENDPOINT: https://api.graph.cool/simple/v1/cjkqvvoxy2pyy0175cdmdy1mz
timeout: 60
events:
- http:
method: head
path: /
londonliving-rss:
handler: src/londonliving.get
name: ${self:provider.stage}-londonliving-rss
description: Serves the London Living RSS feed.
events:
- http:
method: get
path: londonliving
londonliving-rss-head:
handler: src/londonliving.head
name: ${self:provider.stage}-londonliving-rss-head
description: Serves the HEAD request London Living RSS feed.
events:
- http:
method: head
path: londonliving