Other Linux Services – non-AWS

Other Linux Services – non-AWS

Other Linux Services – non-AWS

Non-AWS Linux services may offer similar services to Amazon, which is good. However, they may have differences you cannot control. For example, I had to install iTerm2 to stop command lines from scrolling in a shell terminal (which can be fatal when unintended commands execute) and I had to use constructs like this (see below) for multiple lines:

# {
> date
> date
> date
}

One may need to install other shells – see the command “cat /etc/shells” to see what is installed.

I found no issues with the vi editor on Amazon Linux2023, Debian, or Ubuntu, but I did on another service. One has to decide about this.

Another service may give very close to the same performance as Amazon, but not necessarily exactly. However. another service may offer more Disk Space and lower price.

I have not tested all Cloud storage systems available on the market, but so far, Amazon S3 Bucket access has been fastest and cheapest.

There seems to be a current issue with one known VPN service being blocked from Amazon S3 Buckets – I cannot confirm but will revisit this. I don’t know if this effects CDN.

The other issue is accessing S3 buckets via the aws command. One has to change the way we access buckets from a non-Amazon service, just a little.

To use AWS S3 buckets, search “install aws cli” and follow the instructions, then test on a bucket you have with “aws s3 ls s3://My_Bucket/”

Here is a WordPress plugin php script that gives a basic format for a website to access the aws output. One does not need this on an Amazon instance with an IAM profile attached.

putenv('AWS_DEFAULT_REGION=ap-southeast-2');
putenv('AWS_ACCESS_KEY_ID=aaaaaaaaaaaa');
putenv('AWS_SECRET_ACCESS_KEY=bbbbbbbbbbbbbbbbbbbbbbb');
$command = "export AWS_DEFAULT_REGION; export AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY;/var/www/html/YOUR_AWS_SCRIPT.sh 2>/dev/null";
$output = shell_exec($command);
echo "$output";
PHP_EOL;

One has to export the aws configuration variables. Of course, one only needs to configure the ~/.aws config file once, as per other articles I have provided.

If you try multiple configurations within a script, or the command line, it will corrupt the original “aws configure” settings in ~/.aws, so one would have to delete the configuration file and do it again.