-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml.sample
94 lines (84 loc) · 2 KB
/
serverless.yml.sample
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
86
87
88
89
90
91
92
93
94
# serverless.yml
# https://docs.serverless.com
# https://medium.com/nextfaze/binary-responses-with-serverless-framework-and-api-gateway-5fde91376b76
# https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
service: "lambda-htmlmeta"
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
frameworkVersion: ">=1.28.0 <2.0.0"
# you can overwrite defaults here
stage: dev
region: us-east-1
plugins:
- serverless-api-cloudfront
custom:
domain: {you.example.com}
bucket: {you-example-com}
certificate: {arn for your ACM TLS certificate}
apiCloudFront:
domain: ${self:custom.domain}
certificate: ${self:custom.certificate}
logging:
bucket: ${self:custom.bucket}.s3.amazonaws.com
prefix: ${self:provider.stage}
cookies: none
compress: true
querystring:
- url
provider:
name: aws
runtime: go1.x
stage: ${opt:stage, 'dev'}
memorySize: 128
timeout: 10
# tags:
package:
exclude:
- ./**
include:
- ./bin/**
functions:
opengraph:
handler: bin/htmlinfo
environment:
"META_OPENGRAPH": "true"
events:
- http:
path: opengraph
method: get
oembed:
handler: bin/htmlinfo
environment:
"META_OEMBED": "true"
events:
- http:
path: oembed
method: get
microdata:
handler: bin/htmlinfo
environment:
"META_MICRODATA": "true"
events:
- http:
path: microdata
method: get
microformats2:
handler: bin/htmlinfo
environment:
"META_MICROFORMATS2": "true"
events:
- http:
path: microformats2
method: get
# you can add CloudFormation resource templates here
resources:
Resources:
NewResource:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.bucket}
Outputs:
ApiDistribution:
Description: "ApiDistribution"
Value: ApiDistribution