'Adds a new content object to the Distribution.  The content
for the object will be copied to a new Key in the S3 Bucket
and the permissions will be set appropriately for the type
of Distribution.
:type name: str or unicode
:param name: The name or key of the new object.
:type content: file-like object
:param content: A file-like object that contains the content
for the new object.
:type headers: dict
:param headers: A dictionary containing additional headers
you would like associated with the new
object in S3.
:rtype: :class:`boto.cloudfront.object.Object`
:return: The newly created object.'

def add_object(self, name, content, headers=None, replace=True):

    if self.config.origin.origin_access_identity:
        policy = 'private'
    else:
        policy = 'public-read'
    bucket = self._get_bucket()
    object = bucket.new_key(name)
    object.set_contents_from_file(content, headers=headers, policy=policy)
    if self.config.origin.origin_access_identity:
        self.set_permissions(object, replace)
    return object
