How to Use Basic AWS CLI Commands with Storm Object Storage

Posted on by J. Mays | Updated:
Reading Time: 2 minutes

Storm Object Storage delivers a durable, secure, highly available solution for storage needs of virtually any size. With object storage access occurs via API calls to the object storage cluster, which replaces the need to rely on additional servers for dedicated storage.

Here we use the client AWS CLI to interact with Storm Object Storage. If you don’t have AWS CLI installed then you can follow these instructions: How to Install an Object Storage Command Line Interface (AWS CLI)

Storm Object Storage 101: Command Line
Pre-Flight Check
  • These instructions are intended specifically for using Storm Object Storage.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server with AWS CLI installed, and I’ll be logged in as root.

Create a Bucket

aws --endpoint-url https://objects.liquidweb.services s3api create-bucket --bucket examplebucket

The bucket is, generally speaking, the container that will hold your data. In this case, we’ve specified the bucket to be named examplebucket.

Buckets are used to control access and organize data; they cannot be nested as directories can. They also have to be completely unique across the entire Object Storage cluster. So, even though you may not have a bucket called examplebucket, if someone else does you will receive the following error upon trying to create that bucket:

A client error (BucketAlreadyExists) occurred when calling the CreateBucket operation: Unknown

Be sure to choose a unique name for your bucket!

Upload a File

aws --endpoint-url https://objects.liquidweb.services s3 cp example_file_source.txt s3://examplebucket/example_file_target.txt

This command will upload the file example_file_source.txt (which is in the directory where the command is executed) to the bucket examplebucket with the file name example_file_target.txt. The source file name and the destination file name can be the same, or you can specify a new file name via this command.

Upload Contents of a Directory

aws --endpoint-url https://objects.liquidweb.services s3 sync . s3://examplebucket

This command will upload all of the contents in the directory where the command is executed to the bucket examplebucket.

List Contents of a Bucket

aws --endpoint-url https://objects.liquidweb.services s3 ls examplebucket

This command will list all of the contents in the bucket examplebucket.

List Contents of a Directory Within a Bucket

aws --endpoint-url https://objects.liquidweb.services s3 ls examplebucket/exampledir/

This command will list all of the contents in the directory exampledir which is in the bucket examplebucket.

Avatar for J. Mays

About the Author: J. Mays

As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!

Latest Articles

How to use kill commands in Linux

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change the root password in WebHost Manager (WHM)

Read Article