generated from awsmag/aws-lambda-koa-barebone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
31 lines (31 loc) · 818 Bytes
/
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
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description:
The barebone for aws lambda using koa and api gateway
Globals:
Function:
Timeout: 30
Runtime: nodejs10.x
MemorySize: 512
Resources:
ApiGateway:
Type: AWS::Serverless::Api
Properties:
Name: API
StageName: Test
Cors:
AllowMethods: "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'"
AllowHeaders: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'"
AllowOrigin: "'*'"
APIRoutes:
Type: AWS::Serverless::Function
Properties:
CodeUri: "./src"
Handler: index.handler
Events:
APIEvent:
Type: Api
Properties:
RestApiId: !Ref ApiGateway
Path: /{proxy+}
Method: ANY