AWS CLI commands to manage your DreamObjects data


This article lists several aws-cli commands you can use to manage your DreamObjects data. View the following article for information on how to install and configure AWS CLI:


Making a bucket

[user@localhost]$ aws --endpoint-url s3 mb s3://newbucketname
make_bucket: s3://newbucketname/


Listing all buckets under a user

[user@localhost]$ aws --endpoint-url s3 ls
2019-01-31 20:14:46 newbucketname

Listing the contents of a specific bucket

Use the following flags to display data about the size of your Objects.

  • --recursive
  • --human-readable
  • --summarize

View the 'ls' page for further options:

[user@localhost]$ aws --endpoint-url s3 ls --recursive --human-readable --summarize s3://my-bucket/
2019-01-30 12:37:51    0 Bytes backups/
2019-02-03 11:43:16  107.1 MiB backups/
2019-02-03 11:43:04   70.2 KiB backups/
2019-02-03 12:36:25    3.9 KiB test.txt

Total Objects: 4
   Total Size: 107.2 MiB


Deleting an object in a bucket

[user@localhost]$ aws --endpoint-url s3 rm s3://my-bucket/file.txt
delete: s3://my-bucket/file.txt

Deleting an empty bucket

[user@localhost]$ aws --endpoint-url s3 rb s3://newbucketname/
remove_bucket: s3://newbucketname/


Uploading a file into a bucket

[user@localhost]$ aws --endpoint-url s3 cp file.txt s3://my-bucket/file.txt
upload: ./file.txt to s3://my-bucket/file.txt


Downloading a file from a bucket

[user@localhost]$ aws --endpoint-url s3 cp s3://my-bucket/file.txt file.txt
download: s3://my-bucket/file.txt to ./file.txt

Did this article answer your questions?

Article last updated PST.