'Gets an attribute from an image.
:type image_id: string
:param image_id: The Amazon image id for which you want info about
:type attribute: string
:param attribute: The attribute you need information about.
Valid choices are:
* launchPermission
* productCodes
* blockDeviceMapping
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: :class:`boto.ec2.image.ImageAttribute`
:return: An ImageAttribute object representing the value of the
attribute requested'

def get_image_attribute(self, image_id, attribute='launchPermission', dry_run=False):

    params = {'ImageId': image_id, 'Attribute': attribute}
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_object('DescribeImageAttribute', params, ImageAttribute, verb='POST')
