Dynamic Email Groups for Reporting Tool

Introduction

The reporting tool has been enhanced with a new dynamic email management system. This update introduces a more flexible and maintainable way to manage email notifications for different reporting groups using DynamoDB, replacing the previous static configuration approach.

Features

Dynamic Email Management

Architecture Improvements

Examples

DynamoDB Table Structure

The new email configuration is stored in DynamoDB with a simple schema:

{
  "group": "string",    // Primary key - group name
  "emails": ["string"]  // List of email addresses for the group
}

Behavior Examples

When Emails are Configured

When a group has email recipients configured, the system will:

  1. Generate the report
  2. Save it to S3
  3. Send email notifications to all configured recipients

Example log output:

[INFO] CSV file created at backups/AllContracts/daily_backup_report.csv with 5 records
[INFO] Email sent successfully to recipient@example.com

When Emails are Not Configured

If a group doesn’t have any email recipients configured, the system will:

  1. Generate the report
  2. Save it to S3
  3. Log a warning message

Example log output:

[ERROR] No email provided for group Internal

Conclusion

This update significantly improves the flexibility and maintainability of email notifications in the reporting tool. Teams can now manage email recipients for different groups independently through DynamoDB, without requiring deployment changes.

Next Steps