Skip to content

Data Management

Introduction

Managing data in Switch Cloud S3 involves uploading, listing, downloading, and deleting objects. This section provides examples of these operations using the AWS CLI and Rclone.

Prerequisites

  • Obtain SCS3 credentials through the Switch Cloud Portal. Remember that each project has its own unique keys.
  • One of the S3 compatible CLI client (AWS CLI Version 2.13, Rclone) installed and configured with your SCS3 credentials. For more information about setting up your S3 compatible client credentials visit User Authentication.

Upload an Object

To upload an object, run:

aws s3 cp <local-file-path> s3://<bucket-name>/<object-name>
Example output
upload: ./localfile.txt to s3://switchstoragebucket/localfile.txt

To upload an object, run (no output, if successful):

rclone copy <local-file-path> <s3_profile>:<bucket_name>/

List Objects in a Bucket

To list objects in a bucket, run:

aws s3 ls s3://<bucket-name>/
Example output
2024-11-15 12:22:44          0 my-test
2024-11-15 12:23:07          0 test-file.txt

To list objects in a bucket, run:

rclone lsl <s3_profile>:<bucket-name>
Example output
0 2025-03-06 16:11:27.181611300 myfile.txt
0 2025-03-10 13:35:13.397000000 myfileuploaded.txt

Download an Object

To download an object, run:

aws s3 cp s3://<bucket-name>/<object-name> <local-file-path>
Example output
download: s3://switchstoragebucket/localfile.txt to ./localfile.txt

To download an object, run (no output, if successful):

rclone copy <s3_profile>:<bucket_name>/<object_name> <local_file_path>

Delete an Object

To delete an object, run:

aws s3 rm s3://<bucket-name>/<object-name>
Example output
delete: s3://switchstoragebucket/localfile.txt

To delete an object, run (no output, if successful):

rclone delete <s3_profile>:<bucket_name>/<object_name>