#NEWLINE# def make_s3_conn( self , region = '' ) : #NEWLINE# #INDENT# "Create a connection to S3.\n\n        :param region: region to use to choose S3 endpoint.\n\n        If you are doing anything with buckets other than creating them\n        or fetching basic metadata (name and location), it's best to use\n        :py:meth:`get_bucket` because it chooses the appropriate S3 endpoint\n        automatically.\n\n        :return: a :py:class:`boto.s3.connection.S3Connection`, wrapped in a\n                 :py:class:`mrjob.retry.RetryWrapper`\n        " #NEWLINE# if ( boto is None ) : #NEWLINE# #INDENT# raise ImportError ( 'You must install boto to connect to S3' ) #NEWLINE# #UNINDENT# host = ( self . _s3_endpoint or s3_endpoint_for_region ( region ) ) #NEWLINE# log . debug ( ( 'creating S3 connection (to %s)' % host ) ) #NEWLINE# raw_s3_conn = boto . connect_s3 ( aws_access_key_id = self . _aws_access_key_id , aws_secret_access_key = self . _aws_secret_access_key , host = host , security_token = self . _aws_security_token ) #NEWLINE# return wrap_aws_conn ( raw_s3_conn )