-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
42 lines (39 loc) · 1.14 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
AWSTemplateFormatVersion: 2010-09-09
Description: >-
zedoc-sample-graphql
Transform:
- AWS::Serverless-2016-10-31
Parameters:
TestParam:
Type: String
Default: "To be changed"
Resources:
# Each Lambda function is defined by properties:
# https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
# This is a Lambda function config associated with the source code: graphqlServer.js
GraphqlServerFunction:
Type: AWS::Serverless::Function
Metadata:
BuildMethod: esbuild
Properties:
Handler: src/handlers/graphqlServer.default
Runtime: nodejs18.x
Architectures:
- x86_64
MemorySize: 128
Timeout: 100
Description:
A simple example of graphql server.
Environment:
Variables:
TEST_VAR: !Ref TestParam
Events:
Api:
Type: Api
Properties:
Path: /graphql
Method: POST
Outputs:
WebEndpoint:
Description: API Gateway endpoint URL for Prod stage
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"