Environment Setup
See the Getting Started docs for how to download and log in to the CLI.
Storage CLI
Create new bucket
evroc storage bucket new fancybucket
List buckets in the current resource-group
evroc storage bucket ls
Show information about a specific bucket
evroc storage bucket show fancybucket
Note: The above command outputs in the same format as the list (ls) command, to show detailed information, add the --verbose flag.
List objects/files in a bucket
evroc storage bucket ls fancybucket
Delete empty bucket
Note: If the bucket is not empty, an error "cannot delete non-empty bucket" will be displayed when running the evroc storage bucket ls command.
evroc storage bucket rm fancybucket
Delete non-empty bucket
It is possible to delete a bucket and all of its objects "in one go". Since this is an operation that cannot be undone, an extra interactive confirmation will be required.
evroc storage bucket rm fancybucket --purge
Examples
Copying objects to/from bucket in user interactive session
# Create a new bucket with yourself as owner (IMPORTANT!!)
# If no owner is specified with the -o flag, the currently logged in user is set as the owner
$ evroc storage bucket new testbucket1
testbucket1 created
# Create some random text in a file to test with
$ echo "The quick brown fox" > foo.txt
# Copy a local file to a bucket object
$ evroc storage bucket copy --from foo.txt --to s3://testbucket1/foo.txt
# List objects in bucket
$ evroc storage bucket ls testbucket1
Name Size[bytes] Last Modified Storage Class
--------- ------------- ---------------------- ---------------
foo.txt 20 2025-07-03T13:49:19Z STANDARD
# Copy a bucket object to a local file
$ evroc storage bucket copy --from s3://testbucket1/foo.txt --to foo-copy.txt
# Delete bucket
$ evroc storage bucket rm testbucket1 --purge
Copying objects to/from bucket with s5cmd and exported S3 credentials
Note: This example requires use of s5cmd
This can be installed on a linux box by downloading the relevant binary from their
"releases" page and installing it via e.g. sudo apt install ./s5cmd_2.3.0_linux_amd64.deb
Create a service account and assign it as owner of a bucket
# Create a service account
$ evroc iam serviceaccount create my-sa
my-sa created
# Create a new bucket with the service account as owner
# When one ore more owners are given with the -o flag, only those owners will be the owners of the created bucket
$ evroc storage bucket new testbucket7 -o ServiceAccount.my-sa
testbucket7 creation requested
# For clarity, list your buckets
$ evroc storage bucket ls
Name Age Owners Bucket URL Ready Reason Errors
------------- ----- ---------------- ------------------ ------- -------- --------
testbucket7 28d alice@test.org s3://testbucket7 True Ready
Get the credentials and store them in a file
> evroc storage bucket get-s3-credentials -n my-sa
[my-sa]
aws_access_key_id = <ACCESS KEY ID>
aws_secret_access_key = <ACCESS KEY>
To set the credentials in your shell:
export AWS_ACCESS_KEY_ID='<ACCESS KEY ID>'
export AWS_SECRET_ACCESS_KEY='<ACCESS KEY>'
You can then create a credential file called my-s3-credentials with the following contents:
[my-sa]
aws_access_key_id = <ACCESS KEY ID>
aws_secret_access_key = <ACCESS KEY>
Copy the file
# Set the endpoint to evroc Storage
$ export S3_ENDPOINT_URL="https://storage.prod.evroclabs.net/"
# Create some random text in a file to test with
$ echo "The quick brown fox" > foo.txt
# Copy a local file to a bucket object
$ s5cmd --credentials-file my-s3-credentials --profile my-sa cp ./foo.txt s3://testbucket7/foo.txt
2024/01/24 09:46:39 20 foo.txt
# List objects in bucket
$ s5cmd --credentials-file my-s3-credentials --profile my-sa ls s3://testbucket7/
Name Size[bytes] Last Modified Storage Class
foo.txt 20 2024-01-24 11:14:05.263 +0000 UTC STANDARD
# Copy a bucket object to a local file
$ s5cmd --credentials-file my-s3-credentials --profile my-sa cp s3://testbucket7/foo.txt foo-copy.txt
Note: Credentials, similar to bucket URLs, are scoped to the current resource group. To access a bucket (e.g. s3://testbucket7), the credentials must have been issued within the same resource group in which the bucket resides.