Lambda function implementing an executor pattern to run scheduled tasks via CloudWatch Events/EventBridge rules. Each rule's name maps directly to its corresponding function, enabling independent scheduling.
- CloudWatch Events/EventBridge rules trigger the Lambda
- Rule name pattern:
<function_name>
- Function mapping handled by Executor class
- Modular design for easy addition of new functions
- AWS Lambda
- CloudWatch Events/EventBridge
- AWS Secrets Manager for credentials
- Python 3.9+
SECRET_ARN
: Secrets Manager ARN containing required credentials
- Add function to Executor class
- Map function in
function_mapping
dictionary - Create corresponding CloudWatch rule which matches the function name and a schedule
- Add rule as trigger to executor lambda function
Processes GOES X-ray satellite data:
- Fetches 3-day X-ray flux data from NOAA
- Filters last 24 hours
- Handles both wavelength channels (0.05-0.4nm, 0.1-0.8nm)
- Stores in Amazon Timestream
Manages solar flare annotations:
- Processes 7-day GOES flare data
- Creates Grafana annotations for flare events
- Marks start, peak, and end times
- Tags events for filtering
- HTTP 200: Successful execution
- HTTP 500: Execution failure with error details
- Comprehensive logging via swxsoc