Containers
Creation a container
In the Control Panel go to the “Object Storage” / “Containers” section.
Click the “Create” button.
Specify the name of the created container. It is acceptable to use Latin letters in a DNS compatible format. First of all, it is necessary to keep in mind the following rules:
The name should be in lower case. The name should begin and end with a letter or number. Valid characters: „a-z“, „0-9“, „-“, „.“;
The name should begin and end with a letter or number;
The length of the name should be at least 3 and not more than 255 characters;
There should be at least three characters between dots in the title.
Select type of container’s access:
Private - only authorized users will get access to the container;
Public objects - access to read objects is allowed to everyone without additional authorization. At the same time, it is forbidden to read the list of objects without authorization;
Public Full - full read access to the container and objects is allowed to all Internet users without additional authorization.
Select a storage region.
Note
Currently, we are working on availability of the Object storage in 3HCloud regions
Click “Create container”.
Tariffs
Data storage in Object storage: $0,008/GB per month;
Incoming traffic to Object Storage: $0.00/GB;
Outgoing traffic from Object storage:
to other 3HCloud services in the region: $0.00/GB;
to the Internet: $0,008/GB.
Container setup
The created container will appear in the “Object storage” / “Containers” section.
For further settings click “More”.
To upload the files on the container click “Upload” and select the required files or drag-and-drop them to the specified area.
Create new folders here and delete unnecessary files or folders.
If you need to change the access type of your container, click on “Edit” in the Access type section, select the required access type and click “Save”.
When you select the Public objects access type each uploaded object will have a personal link for accession to object without any authorization.
When you select the Public Full access type, a link to container’s access will appear to container’s access which opens an XML file with a list of container objects.
Removing a container
In the Control Panel go to the “Object Storage” / “Containers” section.
Go to the settings of the required container by clicking “More”.
Attention
Deleting a container is possible only after deleting all placed objects.
Select all objects in the container and click “Delete Selected”.
If there are folders, delete each folder individually by clicking on the trash icon.
After deleting all files and folders click “Delete” and confirm the deletion.
Installing AWS-CLI and setting the configuration file
There are several ways to install AWS-CLI depending on the type of operating system you use:
On Microsoft Windows use the MSI installer.
On Linux or MacOS use pip (a package manager for Python software) or install manually using the default installer.
To install with pip, firstly, install python (if it is not installed yet).
You can verify it by running:
python3 --version
pip3 --help
Considering that both of them are installed use the following command to install aws cli:
$ pip3 install awscli
If python3 and pip3 are not installed, run:
$ sudo apt install python3 -y # for Debian, Ubuntu
$ sudo yum install python3 -y # for CentOS
$ sudo dnf install python3 -y # for CentOS8
$ Python3 -m Pip install
Next, install the awscli plugin:
pip3 install awscli-plugin-endpoint
Verify that the AWS CLI is installed correctly by reviewing the reference file. Open a terminal, shell or command prompt and run:
$ aws help
After the installation register the connection address, access key and EC2 secret key from your personal account to the AWS configuration file:
$ mcedit .aws/config - you can use any text redactor utility;
[plugins]
endpoint = awscli_plugin_endpoint
[profile *any name*]
aws_access_key_id = *Your open EC2 key from account*
aws_secret_access_key = *Your closed EC2 key from account*
region = us-east-1
s3 =
endpoint_url = https://s3.mia.3hcloud.com
signature_version = s3v4
addressing_style = virtual
s3api =
endpoint_url = https://s3.mia.3hcloud.com
Checking the connection to the container:
$ aws --profile *profile name from config* s3 ls
2009-02-03 19:45:09 example
The command to view the files in the container:
$ aws --profile *profile name from config* s3 ls s3://example/
2022-04-08 14:23:57 12749 1.png
2022-05-18 16:02:30 110574 asbru_export.yml
2022-04-07 15:35:12 144817 photo_2022-04-07_15-34-05.jpg
2022-04-14 16:18:41 123186 photo_2022-04-14_16-17-51.jpg
2022-05-25 12:54:47 115560 vhod.jpg
2022-05-18 16:01:15 274181883 z.zip
2022-05-27 12:46:40 486018 George Clason.pdf
For a more detailed view the files in the container:
$ aws --profile *profile name from config* s3 ls s3://example/ --human --summarize
2022-04-08 14:23:57 12.5 KiB 1.png
2022-05-18 16:02:30 108.0 KiB asbru_export.yml
2022-04-07 15:35:12 141.4 KiB photo_2022-04-07_15-34-05.jpg
2022-04-14 16:18:41 120.3 KiB photo_2022-04-14_16-17-51.jpg
2022-05-25 12:54:47 112.9 KiB vhod.jpg
2022-05-18 16:01:15 261.5 MiB z.zip
2022-05-27 12:46:40 474.6 KiB George Clason.pdf
Total Objects: 7
Total Size: 262.4 MiB
Uploading a file into container is through the command:
$ aws --profile *profile name from config* s3 cp "/home/PC/Download/RouterOS.raw" s3://example/
Deleting the files in a container is with the command:
$ aws --profile *profile name from config* s3 rm s3://example/RouterOS.raw