Skip to content

Commit a0cc8c2

Browse files
authored
Merge pull request #876 from PRX/chore/cpm_metrics_export
Init cpm export
2 parents c09ed73 + 13ae222 commit a0cc8c2

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

spire/templates/apps/dovetail-metrics-export.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,47 @@ Resources:
257257
Principal: events.amazonaws.com
258258
SourceArn: !GetAtt CneNetworkExport.Arn
259259

260+
CpmNetworkExport:
261+
Type: AWS::Events::Rule
262+
Condition: EnableProductionRules
263+
Properties:
264+
Description: CPM network data export
265+
RoleArn: !GetAtt RulesRole.Arn
266+
ScheduleExpression: cron(15 0 * * ? *) # 00:15 UTC every day
267+
State: ENABLED
268+
Targets:
269+
- Arn: !GetAtt ExportFunction.Arn
270+
Id: !Sub "${RootStackName}.Export.CPMNetwork"
271+
Input: |-
272+
{
273+
"PodcastIDs": [
274+
10059,
275+
10060,
276+
10061,
277+
10062,
278+
10063,
279+
10064,
280+
10065,
281+
10066,
282+
10686
283+
],
284+
"ObjectPrefix": "PRX/",
285+
"Copies": [
286+
{
287+
"Mode": "AWS/S3",
288+
"BucketName": "cpm-cdp-platform"
289+
}
290+
]
291+
}
292+
CpmNetworkExportInvokePermission:
293+
Condition: EnableProductionRules
294+
Type: AWS::Lambda::Permission
295+
Properties:
296+
Action: lambda:InvokeFunction
297+
FunctionName: !Ref ExportFunction
298+
Principal: events.amazonaws.com
299+
SourceArn: !GetAtt CpmNetworkExport.Arn
300+
260301
BoostrIntegration:
261302
Type: AWS::Events::Rule
262303
Condition: EnableProductionRules

0 commit comments

Comments
 (0)