From 7a864d1f3cf8152e94ca2f78f05a680919554665 Mon Sep 17 00:00:00 2001 From: "Charles E. Gormley" Date: Tue, 10 Sep 2024 22:56:09 -0400 Subject: [PATCH] eventbridge issues. --- src/infra/cloudformation/eventbridge.yaml | 12 +++++++----- src/infra/deploy_infrastructure.py | 2 +- todo.md | 7 +++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/infra/cloudformation/eventbridge.yaml b/src/infra/cloudformation/eventbridge.yaml index 6d7a913..dbbe90f 100644 --- a/src/infra/cloudformation/eventbridge.yaml +++ b/src/infra/cloudformation/eventbridge.yaml @@ -5,11 +5,13 @@ Parameters: Resources: EventBridgeSchedule: - Type: AWS::Events::Rule + Type: AWS::Scheduler::Schedule Properties: Name: rss-feed-processor-schedule Description: Runs the RSS Feed Processor Lambda function every hour - ScheduleExpression: rate(1 hour) # TODO: Turn this into a variable. - Targets: - - Arn: !Ref LambdaFunctionArn - Id: rss-feed-processor-lambda \ No newline at end of file + ScheduleExpression: rate(10 minutes) + FlexibleTimeWindow: + Mode: FLEXIBLE + MaximumWindowInMinutes: 1 + Target: + Arn: !Ref LambdaFunctionArn \ No newline at end of file diff --git a/src/infra/deploy_infrastructure.py b/src/infra/deploy_infrastructure.py index eb8d991..e9417fd 100644 --- a/src/infra/deploy_infrastructure.py +++ b/src/infra/deploy_infrastructure.py @@ -179,7 +179,7 @@ def deploy_infrastructure(): ] ) - deploy_cloudformation('eventbridge.yaml', 'EventBridgeSchedule', + deploy_cloudformation('eventbridge.yaml', 'Schedule', parameters=[ { 'ParameterKey': 'LambdaFunctionArn', diff --git a/todo.md b/todo.md index c070581..73a68ac 100644 --- a/todo.md +++ b/todo.md @@ -1,15 +1,14 @@ # TODO Before Launch 🚀 -* Delete KMS KEY test. +* Delete KMS KEY test. +* Fix eventbridge issues. + * Create role for eventbridge scheduler * Fix lambda error with pacakges. * Test from 3rd party aws account. - # Misc TODO: * More RSS Feed Module - Easy * Add in console setup python script for new project into launch.py - - # Next Modules * Vector Database Storage Solution w/ Pinecone. * Gen AI Summarization Module.