forked from qti3e/registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
50 lines (46 loc) · 1.67 KB
/
template.yaml
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
# See the following for documentation:
# https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md
# https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/lambda_edge/template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: deno.land
Resources:
DenoLandCloudFront:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Aliases:
- deno.land
Enabled: true
PriceClass: PriceClass_100
ViewerCertificate:
AcmCertificateArn: "arn:aws:acm:us-east-1:996721126982:certificate/17ec3785-d60f-46af-837f-fbeefdb31203"
MinimumProtocolVersion: TLSv1.1_2016
SslSupportMethod: sni-only
DefaultCacheBehavior:
TargetOriginId: DenoLandOrigin
LambdaFunctionAssociations:
- EventType: origin-request
LambdaFunctionARN: !Ref DenoLandFunction.Version
ForwardedValues:
QueryString: false
Headers:
- Accept
ViewerProtocolPolicy: redirect-to-https
Origins:
- Id: DenoLandOrigin
DomainName: "deno.land.s3.amazonaws.com"
S3OriginConfig:
OriginAccessIdentity: ""
DenoLandFunction:
Type: AWS::Serverless::Function
Properties:
AutoPublishAlias: live3
CodeUri: ./src/
Handler: app.lambdaHandler
Runtime: nodejs8.10
Role: "arn:aws:iam::996721126982:role/service-role/sam-app-role-name"
Outputs:
DenoLandCloudFront:
Description: DenoLandCloudFront DomainName
Value: !GetAtt DenoLandCloudFront.DomainName