-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.yml
57 lines (52 loc) · 1.28 KB
/
template.yml
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Example basic lambda using `holy-lambda` micro library
Parameters:
Runtime:
Type: String
Default: <HOLY_LAMBDA_RUNTIME>
Timeout:
Type: Number
Default: 40
MemorySize:
Type: Number
Default: 2000
CodeUri:
Type: String
Default: <HOLY_LAMBDA_CODE_URI>
Entrypoint:
Type: String
Default: <HOLY_LAMBDA_ENTRYPOINT>
Globals:
Function:
Runtime: !Ref Runtime
Timeout: !Ref Timeout
MemorySize: !Ref MemorySize
CodeUri: !Ref CodeUri
Environment:
Variables:
Entrypoint: !Ref Entrypoint
Resources:
ExampleLambdaFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: ExampleLambdaFunction
Handler: cdk-azure-pipelines.core.ExampleLambda
Events:
HelloEvent:
Type: HttpApi
Properties:
ApiId: !Ref ServerlessHttpApi
Path: /
Method: GET
ServerlessHttpApi:
Type: AWS::Serverless::HttpApi
DeletionPolicy: Retain
Properties:
StageName: Prod
Outputs:
ExampleLambdaEndpoint:
Description: Endpoint for ExampleLambdaFunction
Value:
Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com