def upsert_record(client, zoneid, record_name, value, record_type='A', ttl=300):
    """Updates or Creates the specified AWS Route 53 domain resource record

    Parameters
    ----------
    client: boto3.client
        The boto3 'route53' client to utilize for the update request
    zoneid: str
        The Route 53 Hosted Zone ID where the record to be created/updated
        resides
    record_name: str
        The fully qualified name for the DNS record to be created/updated. Note:
        the trailing top-level '.' is optional in this context.
    value: str
        The value which the record will be updated to. Typically the IP address.
    record_type: str
        The record type to create/update. One of:
        'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'
    ttl: int, Optional
        Set the TTL (Time To Live) of the record in seconds. Defaults to 300s

    See Also
    --------
    https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53.html#Route53.Client.change_resource_record_sets

    Returns
    -------
    dict:

        {
            'Id': 'string',
            'Status': 'PENDING'|'INSYNC',
            'SubmittedAt': datetime(year, month, day),
            'Comment': 'string'
        }

    """
    response = client.change_resource_record_sets(
        HostedZoneId=zoneid,
        ChangeBatch={
            'Comment': 'Update record initiated by r53ddns.py',
            'Changes': [
                {
                    'Action': 'UPSERT',
                    'ResourceRecordSet': {
                        'Name': record_name,
                        'Type': record_type,
                        'TTL': ttl,
                        'ResourceRecords': [
                            {'Value': value}
                        ]
                    }
                }
            ]
        }
    )
    return response['ChangeInfo']