-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudformation-resources-v2.yaml
44 lines (40 loc) · 1 KB
/
cloudformation-resources-v2.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
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: Compute resources.
Parameters:
LambdaFunctionImageUri:
Type: String
Globals:
Function:
Tracing: Active
Api:
TracingEnabled: true
# Setting this prevent the creation of "Stage" stage in AWS::Serverless::Api
OpenApiVersion: "2.0"
Resources:
# --- HTTP APIs ---
ApiGatewayApiHttp:
Type: AWS::Serverless::Api
Properties:
StageName: prod
# --- Serverless Application Model (SAM) ---
LambdaFunction:
Type: AWS::Serverless::Function
Properties:
Architectures:
- arm64
Events:
GetGraphql:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApiHttp
Path: /graphql
Method: GET
PostGraphql:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApiHttp
Path: /graphql
Method: POST
PackageType: Image
ImageUri: !Ref LambdaFunctionImageUri