SprightlySoft - Connecting you to the cloud.
 

S3 Upload - Documentation

S3 Upload allows you to upload a file to Amazon S3.  It is a command line program and the command line parameters indicate which file you are uploading and where you are uploading it to.  The program uses multipart upload so you can resume an upload if it is interrupted.

Requirements

The application requires a Microsoft Windows computer running the Microsoft .NET Framework 2.0 or later.  You will also need an Amazon AWS account with S3 enabled.

How to Run the Program

Open a command prompt window where S3Upload.exe is located.  Do this by holding down the Shift key on your keyboard and right clicking the S3Upload folder.  From the context menu click Open command window here.  A command prompt window will open.  Type S3Upload.exe and the command line parameters you require to upload your file.  Here is an example of what you would type:

S3Upload.exe -AWSAccessKeyId xxxxxxxxxxxx -AWSSecretAccessKey xxxxxxxxxxxxxx -BucketName mybucket -KeyName "myfolder/myfile.zip" -LocalFile "C:\myfile.zip"

Command Line Parameters

The following describes the parameters of S3 Upload.

-AWSAccessKeyId (required) - Your AWS access key ID provided by Amazon.

-AWSSecretAccessKey (required) - Your AWS secret access key provided by Amazon.

-UseSSL (optional) - Specifies whether SSL should be used when communicating with Amazon.  The default value is true.

  • True - Request URLs to Amazon will begin with https://.
  • False - Request URLs will begin with http://.

-RequestEndpoint (optional) - The endpoint to use in request URLs to Amazon. If no value is specified the application will determine which endpoint to use based on the location of your bucket.

-BucketName (required) - The name of the S3 bucket where you will be uploading the file to.

-KeyName (required) - The name of the file when it is saved in S3.  If the name contains a space you must enclose the value with quotes.

-LocalFile (required) - The full path of the local file you are uploading.  If the path contains a space you must enclose the value with quotes.

-UploadHeaders (optional) - A list of headers to add in the request when uploading the file.  Multiple headers must be separated by the vertical bar character.  Header name and header value must be separated by the colon character.  Example, use "x-amz-acl:public-read|x-amz-storage-class:REDUCED_REDUNDANCY" to make the uploaded file public and stored with reduced redundancy.

-SaveTimestampsInMetadata (optional) - The application can save the last write time and creation time of the file you upload to metadata in S3.  These values may be useful when restoring files locally and you would like to set file timestamps to their original values.  The default value is false.

-SaveETagInMetadataForMultipart (optional) - Save the file's regular format ETag in metadata when uploading with multipart upload.  Amazon does not save ETags in a standard way for a multipart uploaded files.  The regular format ETag may be useful if you are comparing file content by ETag.  The default value is false.

-S3FolderExistsCheck (optional) - The KeyName you specify may contain a S3 folder path.  Use this option to validate if the folder path exists on S3.  The default value is 1.

  • 0 - Do not check if folders exists.
  • 1 - Check if folders exists and show error if a folder does not exist.
  • 2 - Check if folders exists and create non-existing folders.

-UseMultipartUpload (optional) - Specifies if Amazon's multipart upload feature should be used when uploading large files to S3. Multipart upload is beneficial since you can resume an upload if it gets interrupted. If a file is smaller than the MultipartPartSizeBytes value, multipart upload will not be used on that file regardless of this setting. The default value is true.

  • True - Use multipart upload.
  • False - Do not use multipart upload.

-MultipartPartSizeBytes (optional) - The size of a part in bytes when using multipart upload. The smallest size a part can be is 5242880. The default value is 5242880.

-UseServerSideEncryption (optional) - Specifies whether Amazon S3 Server Side Encryption should be used. The default value is false.

-TransferSpeedLimitKBps (optional) - Sets the maximum upload speed in kilobytes per second.  Set the value to 0 if you do not wish to limit the upload speed.  The default value is 0.

-ShowTransferProgress (optional) - Indicates weather progress for an upload should be displayed in the console.  The default value is true.

  • True - Show progress during an upload.
  • False - Do not show upload progress.

-S3ErrorRetries (optional) - The number of times a failure communicating with S3 should be retried.  The delay between retries increases as the number of retries increases.  The default value is 2.

-OutputLevel (optional) - This specifies the level of detail the program outputs. The default value is 1.

  • 1 - Minimal output.
  • 2 - Detailed output.  Show log data when an error occurs.

Setting Parameters In the .Config File

Parameters can be set in the .config file so you do not have to pass them as command line parameters.  This is useful for AWSAccessKeyId and AWSSecretAccessKey as they do not change often.  Open the S3Upload.exe.config file in a text editor such as Notepad and enter your parameter values.

 

 


 
© 2024  SprightlySoft