def METHOD_NAME(ec2, region, today):
    print('Today is {} / {}'.format(today, today.strftime('%A')))
    reservations = ec2.describe_instances(
        Filters=[{'Name': 'tag-key', 'Values': ['backup', 'Backup']}]
    ).get('Reservations', [])
    instances = sum([[i for i in r['Instances']] for r in reservations], [])
    print("Found %d instances that need backing up in region %s" % (len(instances), region))
    to_tag_retention = collections.defaultdict(list)
    to_tag_mount_point = collections.defaultdict(list)
    for instance in instances:
        if today.day == 1:
            # keep snapshots taken on the first day of month
            retention_days = get_tag_value(instance, 'retention_monthly', default=180)
        elif today.strftime('%A') == 'Sunday':
            # keep snapshots taken on Sunday for 'retention_weekly' days
            retention_days = get_tag_value(instance, 'retention_weekly', default=7)
        else:
            # keep all other snapshots for 'retention_daily' days
            retention_days = get_tag_value(instance, 'retention_daily', default=2)
        backup_instance(ec2, instance, retention_days, to_tag_retention, to_tag_mount_point)
    for retention_days in to_tag_retention.keys():
        delete_date = today + datetime.timedelta(days=retention_days)
        delete_fmt = delete_date.strftime('%Y-%m-%d')
        print(
            "Will delete %d snapshots on %s" % (len(to_tag_retention[retention_days]), delete_fmt)
        )
        ec2.create_tags(
            Resources=to_tag_retention[retention_days],
            Tags=[{'Key': 'delete_on', 'Value': delete_fmt}],
        )
    message = "{} instances have been backed up in region {}".format(len(instances), region)
    send_to_sns('EBS Backups', message)