-
Notifications
You must be signed in to change notification settings - Fork 10
/
template.yaml
103 lines (102 loc) · 2.91 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Usage: `sam local invoke restbus`
#
# AWS console UI -> Lambda (Functions -> restbus) -> Download -> Download AWS SAM File
# (renamed to template.yaml).
# Used for testing Lambda function locally.
#
# NOTE: AWS API Gateway does not support ',' (commas) in path segmenst, so tuples
# and locations implementation uses '_' (underscore) on AWS API Gateway!
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: An AWS Serverless Application Model template describing your function.
Resources:
restbus:
Type: AWS::Serverless::Function
Properties:
CodeUri: .
Description: ''
MemorySize: 128
Timeout: 3
# Modified for using SAM CLI locally after a build
Handler: dist/index.handler
Runtime: nodejs20.x
Architectures:
- x86_64
EphemeralStorage:
Size: 512
EventInvokeConfig:
MaximumEventAgeInSeconds: 21600
MaximumRetryAttempts: 2
PackageType: Zip
Policies:
- Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
Resource: arn:aws:logs:us-west-2:601077199463:*
- Effect: Allow
Action:
- logs:CreateLogStream
- logs:PutLogEvents
Resource:
- >-
arn:aws:logs:us-west-2:601077199463:log-group:/aws/lambda/restbus:*
SnapStart:
ApplyOn: None
Events:
Api1:
Type: Api
Properties:
Path: /agencies/omnitrans
Method: ANY
Api2:
Type: Api
Properties:
Path: /agencies
Method: ANY
Api3:
Type: Api
Properties:
Path: /agencies/omnitrans/routes
Method: ANY
Api4:
Type: Api
Properties:
Path: /agencies/omnitrans/vehicles
Method: ANY
Api5:
Type: Api
Properties:
Path: /agencies/omnitrans/routes/1/vehicles
Method: ANY
Api6:
Type: Api
Properties:
Path: /agencies/omnitrans/routes/1
Method: ANY
Api7:
Type: Api
Properties:
Path: /agencies/omnitrans/routes/1/stops/5303/predictions
Method: ANY
Api8:
Type: Api
Properties:
Path: /agencies/omnitrans/stops/5303/predictions
Method: ANY
Api9:
Type: Api
Properties:
Path: /agencies/omnitrans/vehicles/1347
Method: ANY
Api10:
Type: Api
Properties:
Path: /locations/37.784825_-122.395592/predictions
Method: ANY
Api11:
Type: Api
Properties:
Path: /agencies/omnitrans/tuples/1:5303_2:5423/predictions
Method: ANY
RuntimeManagementConfig: {}