-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudformation.json
34 lines (30 loc) · 1.13 KB
/
cloudformation.json
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
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"cloudwatchRuleInvokeLambda": {
"Type": "AWS::Events::Rule",
"Properties": {
"Description": "Invoke Lambda",
"State": "ENABLED",
"ScheduleExpression": "cron(0 6,12,18 * * ? *)",
"Targets": [
{
"Arn": "arn:aws:lambda:us-east-1:833725628045:function:lambda-scraper-fn",
"Input": "{\"operation\":\"call-lambda\"}",
"Id": "cloudwatchRuleInvokeLambda"
}
]
}
},
"cloudwatchRulePermissions": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": "lambda-scraper-fn",
"Action": "lambda:InvokeFunction",
"Principal": "events.amazonaws.com",
"SourceArn": { "Fn::GetAtt": ["cloudwatchRuleInvokeLambda", "Arn"] }
}
}
},
"Description": "Cloudformation template to create a Cloudwatch rule"
}