How to Use Basic AWS CLI Commands with Storm Object Storage
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)
II. How to Configure AWS CLI for Use with Storm Object Storage
III. How to Use Basic AWS CLI Commands with Storm Object Storage
- 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.
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!
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.
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.
aws --endpoint-url https://objects.liquidweb.services s3 ls examplebucket
This command will list all of the contents in the bucket examplebucket.
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.
Related Articles:
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!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Clone a Drupal Site to Another Domain
Read ArticleTop Eight Virtualization Security Issues and Risks
Read ArticleAccessing Man Pages on Ubuntu 16.04 LTS
Read ArticlePremium Business Email Pricing FAQ
Read ArticleMicrosoft Exchange Server Security Update
Read Article