This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
59 lines (56 loc) · 2.07 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
55
56
57
58
59
AWSTemplateFormatVersion: 2010-09-09
Description: >-
vc-api
Transform:
- AWS::Serverless-2016-10-31
# Resources declares the AWS resources that you want to include in the stack
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
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: get-all-items.js
getAllCompaniesFunction:
Type: AWS::Serverless::Function
Properties:
Handler: dist/api/lambda.handler
Runtime: nodejs20.x
Architectures:
- x86_64
MemorySize: 512
Timeout: 100
Description: A simple get api end point hosted with Lambda + API Gateway integration using Fastify
Events:
Api:
Type: Api
Properties:
Path: /companies
Method: GET
postForwardingFunction:
Type: AWS::Serverless::Function
Properties:
Handler: dist/api/lambda.handler
Runtime: nodejs20.x
Architectures:
- x86_64
MemorySize: 512
Timeout: 100
Description: A simple get api end point hosted with Lambda + API Gateway integration using Fastify
Events:
Api:
Type: Api
Properties:
Path: /forwarding
Method: POST
Outputs:
WebEndpoint:
Description: API Gateway endpoint URL for Prod stage
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"
# # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Tracing: Active
# You can add LoggingConfig parameters such as the Logformat, Log Group, and SystemLogLevel or ApplicationLogLevel. Learn more here https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html#sam-function-loggingconfig.
LoggingConfig:
LogFormat: JSON
Api:
TracingEnabled: true