If you need to enhance what modify_replication_group() considers when deciding what is to be
    (or can be) updated, add it to 'modifiable' below.  It's a dict mapping the param as used
    in modify_replication_group() to that in describe_replication_groups().  Any data fiddlery
    that needs to be done to make the mappings meaningful should be done in the munging section
    below as well.

    This function will ONLY touch settings that are explicitly called out in 'desired' - any
    settings which might have previously been changed from their 'default' values will not be
    changed back simply by leaving them out of 'desired'.  This is both intentional, and
    much, much easier to code :)

def _diff_replication_group(current, desired):
    '''
    If you need to enhance what modify_replication_group() considers when deciding what is to be
    (or can be) updated, add it to 'modifiable' below.  It's a dict mapping the param as used
    in modify_replication_group() to that in describe_replication_groups().  Any data fiddlery
    that needs to be done to make the mappings meaningful should be done in the munging section
    below as well.

    This function will ONLY touch settings that are explicitly called out in 'desired' - any
    settings which might have previously been changed from their 'default' values will not be
    changed back simply by leaving them out of 'desired'.  This is both intentional, and
    much, much easier to code :)
    '''
    if current.get('AutomaticFailover') is not None:
        current['AutomaticFailoverEnabled'] = True if current['AutomaticFailover'] in ('enabled',
                'enabling') else False

    modifiable = {
        # Amazingly, the AWS API provides NO WAY to query the current state of most repl group
        # settings!  All we can do is send a modify op with the desired value, just in case it's
        # different.  And THEN, we can't determine if it's been changed!  Stupid?  YOU BET!
        'AutomaticFailoverEnabled': 'AutomaticFailoverEnabled',
        'AutoMinorVersionUpgrade': None,
        'CacheNodeType': None,
        'CacheParameterGroupName': None,
        'CacheSecurityGroupNames': None,
        'EngineVersion': None,
        'NotificationTopicArn': None,
        'NotificationTopicStatus': None,
        'PreferredMaintenanceWindow': None,
        'PrimaryClusterId': None,
        'ReplicationGroupDescription': 'Description',
        'SecurityGroupIds': None,
        'SnapshotRetentionLimit': 'SnapshotRetentionLimit',
        'SnapshottingClusterId': 'SnapshottingClusterId',
        'SnapshotWindow': 'SnapshotWindow'
    }

    need_update = {}
    for m, o in modifiable.items():
        if m in desired:
            if not o:
                # Always pass these through - let AWS do the math...
                need_update[m] = desired[m]
            else:
                if m in current:
                    # Equivalence testing works fine for current simple type comparisons
                    # This might need enhancement if more complex structures enter the picture
                    if current[m] != desired[m]:
                        need_update[m] = desired[m]
    return need_update