Access S3 using AWS CLI
Learn how to configure and use the AWS CLI with WEKA's S3 storage.
To use the AWS CLI to access S3-compatible storage on WEKA, configure the CLI with the appropriate endpoint and credentials.
If you are using a self-signed SSL certificate or a WEKA backend IP address as your S3 endpoint, append
--no-verify-ssl
to any AWS CLI commands listed below.These examples assume you have a properly configured WEKA S3 protocol servers. For guidance on configuring the S3 protocol on your WEKA cluster, see Manage the S3 protocol.
Install and configure the AWS CLI
Verify AWS CLI is installed:
Verify that the AWS CLI is installed on your system. If required, see Install the AWS CLI.
Configure AWS CLI with WEKA credentials:
Use the following command to start configuration:
Enter the following information when prompted:
AWS Access Key ID: Your WEKA S3 user access key.
AWS Secret Access Key: Your WEKA S3 user secret key.
Default region name: You can leave this blank.
Default output format: You can leave this blank.
Enable AWS Signature Version 4 for WEKA server:
WEKA requires AWS Signature Version 4 for authentication. Set it using:
AWS CLI usage
When using AWS CLI commands with WEKA, specify the custom endpoint URL. The following are some common operations:
List buckets
Replace https://your-weka-server:9000
with your WEKA server's actual address.
Create a bucket
This command creates a new bucket named mybucket
.
Upload a file
This command uploads local-file.txt
to the mybucket
bucket.
List bucket contents
This command lists the contents of the mybucket
bucket.
Download a file
This command downloads remote-file.txt
from the mybucket
bucket to the current directory.
Delete a file
This command deletes file-to-delete.txt
from the mybucket
bucket.
Remove a bucket
If you attempt to remove a bucket that is not empty, you receive an error. You must either empty all object versions from the bucket or add --force
to the remove bucket command. --force
deletes the bucket and all object versions within it.
This command removes the mybucket
bucket.
Last updated