Uploading Objects to S3

Uploading objects to plusserver S3 is straightforward using the AWS CLI. The following steps guide you on how to upload objects to your created buckets.

Step 1: Upload an Object

Use the aws s3 cp command to upload an object to a bucket:

aws s3 cp <local-file-path> s3://<bucket-name>/<destination-file-path> --endpoint-url=https://<endpoint-url>
  • <local-file-path>: Specify the path to the local file you want to upload.
  • <bucket-name>: Provide the name of the target bucket.
  • <destination-file-path>: Optional, sets the path in the bucket under which the file will be stored.
  • <endpoint-url>: The corresponding endpoint, depending on your configuration.

Example:

aws s3 cp /path/to/file.txt s3://mynewbucket/file.txt --endpoint-url=https://s3.de-west-1.psmanaged.com

Step 2: View Bucket Contents

Use the aws s3 ls command to view the contents of a bucket:

aws s3 ls s3://<bucket-name> --endpoint-url=https://<endpoint-url>

Example:

aws s3 ls s3://mynewbucket --endpoint-url=https://s3.de-west-1.psmanaged.com

For more information, refer to: Using S3 commands managing objects copy

Last modified 03.05.2024: dos2unix mansvc files (d79b1ea)