How vivicorp-aws/cdk-lab-serverless-task-scheduler works
Main Components
a. Core AWS Services (Primary Layer):
• Amazon EventBridge Scheduler
• AWS Lambda Functions (2 instances)
• Amazon SQS Queue
b. Supporting Services (Secondary Layer):
• AWS CloudWatch (for logging)
• AWS IAM (for roles and permissions)
Logging Flow: Both Lambdas → CloudWatch Logs
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
• EventBridge │ → │ Send Task │ → │ SQS │ → │ Run Task │
• Scheduler │ │ Lambda │ │ Queue │ │ Lambda │
• ┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
• ↓ ↓
• ┌─────────────────┐ ┌─────────────────┐
• CloudWatch │ ← ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ Logs │
• ┘ └─────────────────┘
Important Details
• Scheduler Role (invoke Lambda)
• Send Task Lambda Role (SQS send + CloudWatch)
• Run Task Lambda Role (SQS receive + CloudWatch)
• Lambda timeouts (30s for send-task, 1min for run-task)
• SQS configurations (visibility timeout, retention period)
• Scheduler cron/rate expression
Additional Elements
b. Timing information:
• Task scheduling patterns
• Queue retention periods
• Lambda execution limits
Technical Specifications
• Python runtime version
• Layer dependencies
• Task definition format
• CloudWatch log group structure