-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate.yml
64 lines (58 loc) · 1.89 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
58
59
60
61
62
63
64
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
GetLambdaFunction:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: src/handler/
Handler: get.handler
Runtime: nodejs18.x
Events:
GetLambdaApi:
Type: Api
Properties:
Path: /
Method: get
PostLambdaFunction:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: src/handler/
Handler: post.handler
Runtime: nodejs18.x
Events:
PostLambdaApi:
Type: Api
Properties:
Path: /
Method: post
CWEventLambdaFunction:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: src/handler/
Handler: cloudWatchEvent.handler
Runtime: nodejs18.x
Events:
CWEventLambdaSchedule:
Type: Schedule
Properties:
Schedule: 'rate(1 minute)'
# Schedule: 'cron(1 * * * ? *)'
Outputs:
GetLambdaApi:
Description: "API Gateway endpoint URL for GetLambdaFunction on dev stage"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Dev/"
GetLambdaFunction:
Description: "Get Lambda Function ARN"
Value: !GetAtt GetLambdaFunction.Arn
PostLambdaApi:
Description: "API Gateway endpoint URL for GetLambdaFunction on dev stage"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Dev/"
PostLambdaFunction:
Description: "Post Lambda Function ARN"
Value: !GetAtt PostLambdaFunction.Arn
CWEventLambdaSchedule:
Description: "CloudWatch Event schedule for CloudWatchEventLambdaFunction"
Value: "rate(1 minute)"
CWEventLambdaFunction:
Description: "CloudWatch Event Lambda Function ARN"
Value: !GetAtt CWEventLambdaFunction.Arn