a method for retrieving data of record from AWS S3
            
        :param bucket_name: string with name of bucket
        :param record_key: string with name of key (path) for record
        :param record_version: [optional] string with aws id of version of record
        :param version_check: [optional] boolean to enable current version check
        :return: byte data for record, dictionary with metadata details

def read_record(self, bucket_name, record_key, record_version='', version_check=False):

        '''
            a method for retrieving data of record from AWS S3
            
        :param bucket_name: string with name of bucket
        :param record_key: string with name of key (path) for record
        :param record_version: [optional] string with aws id of version of record
        :param version_check: [optional] boolean to enable current version check
        :return: byte data for record, dictionary with metadata details
        '''

        title = '%s.read_record' % self.__class__.__name__
        
        from datetime import datetime
        from dateutil.tz import tzutc
        
    # validate inputs
        input_fields = {
            'bucket_name': bucket_name,
            'record_key': record_key,
            'record_version': record_version
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)

    # verify existence of bucket
        if not bucket_name in self.bucket_list:
            if not bucket_name in self.list_buckets():
                raise ValueError('S3 bucket "%s" does not exist in aws region %s.' % (bucket_name, self.iam.region_name))
                
    # create key word argument dictionary
        record_kwargs = {
            'Bucket': bucket_name,
            'Key': record_key
        }
        if record_version:
            record_kwargs['VersionId'] = record_version

    # server-side decryption key with request
    #     if password:
    #         pass_title = 'decryption password' + title
    #         key_b64, digest_b64 = self.input.password(password, pass_title)
    #         kw_args['SSECustomerAlgorithm'] = 'AES256'
    #         kw_args['SSECustomerKey'] = key_b64
    #         kw_args['SSECustomerKeyMD5'] = digest_b64

    # send request for record data
        try:
            response = self.connection.get_object(**record_kwargs)
        except:
            raise AWSConnectionError(title)

    # parse record data from response data
        record_data = response['Body'].read()
        del response['Body']

    # create metadata from response
        metadata_details = {
            'key': record_key,
            'version_id': '',
            'current_version': True,
            'content_type': '',
            'content_encoding': '',
            'metadata': {}
        }
        metadata_details = self.iam.ingest(response, metadata_details)
        epoch_zero = datetime.fromtimestamp(0).replace(tzinfo=tzutc())
        metadata_details['last_modified'] = (metadata_details['last_modified'] - epoch_zero).total_seconds()
        if 'response_metadata' in metadata_details.keys():
            del metadata_details['response_metadata']

    # determine current version from version id
        if record_version and version_check:
            version_kwargs = {
                'Bucket': bucket_name,
                'Prefix': record_key
            }
            try:
                version_check = self.connection.list_object_versions(**version_kwargs)
                for version in version_check['Versions']:
                    if version['VersionId'] == metadata_details['version_id']:
                        metadata_details['current_version'] = version['IsLatest']
                        break
            except:
                raise AWSConnectionError(title)

        return record_data, metadata_details