-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.yml
More file actions
47 lines (45 loc) · 1.24 KB
/
template.yml
File metadata and controls
47 lines (45 loc) · 1.24 KB
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
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Serverless Express Application/API powered by API Gateway and Lambda
Resources:
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
DefinitionUri: ./simple-proxy-api.yml
StageName: dev
Variables:
ServerlessExpressLambdaFunctionName: !Ref AtfAvailabilityFunction
AtfAvailabilityFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./src
Handler: lambda.handler
MemorySize: 1024
Role: !GetAtt LambdaExecutionRole.Arn
Runtime: nodejs20.x
Timeout: 30
Events:
ProxyApiRoot:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /
Method: ANY
ProxyApiGreedy:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /{proxy+}
Method: ANY
Outputs:
ApiUrl:
Description: Invoke URL for your API. Clicking this link will perform a GET request
on the root resource of your API.
Value: !Join
- ''
- - https://
- !Ref ApiGatewayApi
- ".execute-api."
- !Ref AWS::Region
- ".amazonaws.com/prod/"