'Returns the boto S3Connection object.'

def get_conn(self):

    if self._default_to_boto:
        return S3Connection(profile_name=self.profile)
    a_key = s_key = None
    if self._creds_in_config_file:
        (a_key, s_key, calling_format) = _parse_s3_config(self.s3_config_file, self.s3_config_format, self.profile)
    elif self._creds_in_conn:
        a_key = self._a_key
        s_key = self._s_key
        calling_format = self.calling_format
        s3_host = self.s3_host
    if (calling_format is None):
        calling_format = 'boto.s3.connection.SubdomainCallingFormat'
    if (s3_host is None):
        s3_host = NoHostProvided
    if self._sts_conn_required:
        sts_connection = STSConnection(aws_access_key_id=a_key, aws_secret_access_key=s_key, profile_name=self.profile)
        assumed_role_object = sts_connection.assume_role(role_arn=self.role_arn, role_session_name=('Airflow_' + self.s3_conn_id))
        creds = assumed_role_object.credentials
        connection = S3Connection(aws_access_key_id=creds.access_key, aws_secret_access_key=creds.secret_key, calling_format=calling_format, security_token=creds.session_token)
    else:
        connection = S3Connection(aws_access_key_id=a_key, aws_secret_access_key=s_key, calling_format=calling_format, host=s3_host, profile_name=self.profile)
    return connection
