'Gets an attribute from an instance.
:type instance_id: string
:param instance_id: The Amazon id of the instance
:type attribute: string
:param attribute: The attribute you need information about
Valid choices are:
* instanceType
* kernel
* ramdisk
* userData
* disableApiTermination
* instanceInitiatedShutdownBehavior
* rootDeviceName
* blockDeviceMapping
* productCodes
* sourceDestCheck
* groupSet
* ebsOptimized
* sriovNetSupport
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: :class:`boto.ec2.image.InstanceAttribute`
:return: An InstanceAttribute object representing the value of the
attribute requested'

def get_instance_attribute(self, instance_id, attribute, dry_run=False):

    params = {'InstanceId': instance_id}
    if attribute:
        params['Attribute'] = attribute
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_object('DescribeInstanceAttribute', params, InstanceAttribute, verb='POST')
