S3Uploader: S3Uploader Class

S3UploaderR Documentation

S3Uploader Class

Description

Contains static methods for uploading directories or files to S3

Methods

Public methods


Method upload()

Static method that uploads a given file or directory to S3.

Usage
S3Uploader$upload(
  local_path = NULL,
  desired_s3_uri = NULL,
  kms_key = NULL,
  sagemaker_session = NULL
)
Arguments
local_path

(str): Path (absolute or relative) of local file or directory to upload.

desired_s3_uri

(str): The desired S3 location to upload to. It is the prefix to which the local filename will be added.

kms_key

(str): The KMS key to use to encrypt the files.

sagemaker_session

(sagemaker.session.Session): Session object which manages interactions with Amazon SageMaker APIs and any other AWS services needed. If not specified, the estimator creates one using the default AWS configuration chain.

Returns

The S3 uri of the uploaded file(s).


Method upload_string_as_file_body()

Static method that uploads a given file or directory to S3.

Usage
S3Uploader$upload_string_as_file_body(
  body,
  desired_s3_uri = NULL,
  kms_key = NULL,
  sagemaker_session = NULL
)
Arguments
body

(str): String representing the body of the file.

desired_s3_uri

(str): The desired S3 uri to upload to.

kms_key

(str): The KMS key to use to encrypt the files.

sagemaker_session

(sagemaker.session.Session): AWS session to use. Automatically generates one if not provided.

Returns

str: The S3 uri of the uploaded file(s).


Method format()

format class

Usage
S3Uploader$format()

Method clone()

The objects of this class are cloneable with this method.

Usage
S3Uploader$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-local documentation built on June 14, 2022, 10:32 p.m.