def _upload_multi_part(storage, connection, src, bucket, object_name): with AwsCli(storage) as awscli: objects = awscli.cp_upload(srcs=[src], bucket_name=bucket.name, dest=object_name) return objects[0]
def check_dependencies(self): if self.config.aws_cli_path == 'dynamic': aws_cli_path = AwsCli.find_aws_cli() else: aws_cli_path = self.config.aws_cli_path try: subprocess.check_call([aws_cli_path, '--version'], stdout=PIPE, stderr=PIPE) except Exception: raise RuntimeError( "AWS cli doesn't seem to be installed on this system and is a " + "required dependency for the S3 backend. Please install it by running 'pip install awscli' " + "or 'sudo apt-get install awscli' and try again.")
def _download_multi_part(storage, connection, src, bucket, blob_dest): with AwsCli(storage) as awscli: awscli.cp_download(src=src, bucket_name=bucket.name, dest=blob_dest)