Daily Backup Reports by Group

Introduction

We are excited to announce a significant enhancement to the base2tools reporting system. The daily backup reports have been completely refactored to provide group-level reporting instead of per-contract reporting, along with the addition of automated email distribution capabilities through AWS Simple Email Service (SES). This update streamlines backup monitoring for organizations managing multiple contracts by consolidating reports at the group level, making it easier to get a comprehensive view of backup status across related contracts.

Features

Group-Level Daily Backup Reports

The reporting system has been fundamentally restructured to aggregate backup reports at the group level rather than generating individual reports for each contract. This provides several key benefits:

Automated Email Distribution via AWS SES

A new email distribution system has been implemented to automatically send daily backup reports to designated recipients:

Enhanced Infrastructure Support

The solution includes several infrastructure improvements:

Examples

Configuration Parameters

When deploying the updated reporting system, you’ll need to configure the following new parameters:

# Development Environment
ContractsGroupsTable: "gateway-dev-contracts-groups"
SESDomain: "tools.aws.base2.services"
SESToEmails: "team@example.com,manager@example.com"

# Production Environment  
ContractsGroupsTable: "gateway-prod-contracts-groups"
SESDomain: "tools.aws.base2.services"
SESToEmails: "ops-team@example.com"

Group Structure in DynamoDB

The new ContractsGroupsTable should be structured with the following schema:

{
  "group": "finance-team",
  "contract": "contract-001"
}

Multiple contracts can belong to the same group:

[
  {
    "group": "finance-team",
    "contract": "contract-001"
  },
  {
    "group": "finance-team", 
    "contract": "contract-002"
  },
  {
    "group": "engineering-team",
    "contract": "contract-003"
  }
]

Report Output Structure

Daily backup reports are now saved in S3 with the following structure:

backups/
├── finance-team/
│   ├── daily_backup_report.csv
│   └── 2025/
│       └── 4/
│           └── 11/
│               └── daily_backup_report.csv
└── engineering-team/
    ├── daily_backup_report.csv
    └── 2025/
        └── 4/
            └── 11/
                └── daily_backup_report.csv

Email Report Format

Recipients will receive emails with the following characteristics:

Lambda Function Updates

The queue populator Lambda function now processes groups instead of individual contracts:

# Old approach (per contract)
messages.append({
    'Id': str(uuid.uuid4()),
    'MessageBody': json.dumps({
        'contract': contract
    })
})

# New approach (by group)
messages.append({
    'Id': str(uuid.uuid4()),
    'MessageBody': json.dumps({
        'group': group,
        'contracts': get_contracts_for_group(group)
    })
})

Conclusion

This release represents a significant improvement in how daily backup reports are generated and distributed within the base2tools reporting system. By moving to group-level reporting and adding automated email distribution, organizations can now more efficiently monitor and manage their backup operations across multiple contracts. The addition of historical data archiving also provides better compliance and audit capabilities.

To implement these changes, ensure you:

  1. Update your CloudFormation/SAM templates with the new parameters
  2. Create and populate the ContractsGroupsTable with your group-contract mappings
  3. Verify your SES domain is properly configured for sending emails
  4. Update recipient email addresses in your environment configuration

For any questions or support regarding this update, please contact the base2Services team.