This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yaml
54 lines (52 loc) · 1.63 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
51
52
53
54
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Drummon CORS Proxy
Globals:
Function:
Timeout: 30
Resources:
DrummonApi:
Type: AWS::Serverless::Api
Properties:
StageName: prod
DefinitionBody:
openapi: 3.0
paths:
"/{proxy+}":
get:
x-amazon-apigateway-any-method:
name: proxy
in: path
required: true
schema:
type: string
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DrummonFunction.Arn}/invocations
x-amazon-apigateway-integration:
httpMethod: GET
passthroughBehavior: when_no_match
type: aws_proxy
uri:
Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DrummonFunction.Arn}/invocations
x-amazon-apigateway-binary-media-types:
- "*/*"
DrummonFunction:
Type: AWS::Serverless::Function
Properties:
Handler: org.mozilla.mixedreality.Drummon::handleRequest
Runtime: java8
CodeUri: target/drummon-1.0-lambda-package.zip
MemorySize: 256
Policies: AWSLambdaBasicExecutionRole
Timeout: 30
Environment:
Variables:
ProxyHost: http://127.0.1.1
AllowedOrigins: https://hubs.mozilla.com
Events:
Proxy:
Type: Api
Properties:
Path: /
Method: get
ContentHandling: CONVERT_TO_BINARY