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.
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:
aws configureEnter 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 configure set default.s3.signature_version s3v4
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