Connecting to S3 Storage Using AWS CLI
Instructions for connecting to S3 storage using AWS-CLI
S3 Storage is an object storage solution designed for storing any digital data, such as documents, images, videos, archives, and more. It uses an HTTP/HTTPS-based API to access data, which can be retrieved via unique URL addresses. Unlike traditional file systems, data in S3 is stored as independent objects with unique keys and metadata, rather than as files within a folder hierarchy.
To install aws-cli on Linux, execute the following commands:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Check the installation:
aws --version
Upon successful installation, you should see output similar to this:
aws-cli/2.27.45 Python/3.13.4 Linux/5.15.0-140-generic exe/x86_64.ubuntu.22
Note
Instructions for installing AWS CLI on Windows and macOS can be found here.
To connect to S3 Storage, you need to configure AWS CLI using your access keys. This information can be found in the billing section of your order.
Run the configuration wizard:
aws configure
Enter the following details:
- AWS Access Key ID: Access Key ID.
- AWS Secret Access Key: Secret Access Key.
- Default region name: Enter the region where your bucket is hosted (e.g.,
us-east-1
) (optional). - Default output format: Choose
json
(recommended) or leave blank for the default value.
Note
Credentials will be saved in the ~/.aws/credentials
file, and the configuration will be stored in ~/.aws/config
.
Add the endpoint for connecting to the storage in the .aws/config
file:
endpoint_url = https://s3-storage-host
# Replace s3-storage-host with the server name from your order billing
The connection setup is now complete.
Useful Commands
List objects in the storage:
aws s3 ls s3://bucket-name
Copy a file from a local directory to the bucket:
aws s3 cp local_file s3://bucket-name
Download a file from the storage to your local computer:
aws s3 cp s3://bucket-name/file /path/to/local/directory
Synchronize a local directory with the storage:
aws s3 sync local_directory/ s3://bucket-name
Delete an object from the storage:
aws s3 rm s3://bucket-name/file
Note
For help with commands, use aws s3 help
Help
If you encounter difficulties or need assistance, please submit a request to our support team through the ticket system, and we will be happy to assist you.