AWS S3 Bucket Setup stopped working

Summary of the problems are at the bottom of this post

Note: I have tested a simple file copy with aws cp file1 s3://bucket/path and have confirmed that AWS CLI is working on the system

I had thought that I was backing up my system incrementally on a weekly basis and fully on Sundays.

However, I looked at my backup report logs and the most recent backup stored in my AWS bucket dates back to February and all others have apparently failed.

So, I ran a test backup on the Virtual Servers, uploading each upon completion. The backup reports “done” when uploading to Amazon AWS, but there’s nothing uploaded anymore. No changes have been made to AWS (unless I missed an important email at some point and didn’t make a needed change.)

So I checked Backup and Restore --> Amazon S3 Buckets and I get “One or more errors occurred listing your S3 buckets: Create new S3 Bucket”

If I view Backup and Restore --> Amzaon S3 Buckets I see my bucket listed, and if I login to AWS I can see under my user settings that the key I’ve used in Virtualmin has been accessed just today (which is when I tested it) so I don’t know what’s happening.

I just tested running a backup with new credentials under one of my users at AWS from the command line:

virtualmin backup-domain --domain --all-features --dest s3://<secret>:<crap>

…and I see 4 times…

'AWSHTTPSConnection' object has no attribute 'ssl_context'

And then it seems to proceed with the backup script, and then this:

Uploading archive to Amazon's S3 service ..

upload failed: ../../../../tmp/.webmin/ to s3:// 'AWSHTTPSConnection' object has no attribute 'ssl_context'

upload failed: ../../../../tmp/.webmin/ to s3:// 'AWSHTTPSConnection' object has no attribute 'ssl_context'

upload failed: ../../../../tmp/.webmin/ to s3:// 'AWSHTTPSConnection' object has no attribute 'ssl_context'

.. done

1 servers backed up successfully, 0 had errors.

Backup completed successfully. Final size was 3.4 GiB

I found this which is inconclusive from 2018…same problem.

First Problem

The report says 1 Servers backed up successfully, 0 had errors. and Backup completed successfully.

The sentiment here is that the Backup script completed successfully but the backup did not actually complete successfully. A rework for this might help in the future.

I’ve updated AWS-CLI to 2.0.22 and verified that the config and credentials files are accurate, but I must be missing something, or I’m looking at the wrong thing.


Make sure you’re fully up to date and have the latest AWS CLI. There is apparently a problem when using newer python requests library versions with older AWS CLI versions. I would hope that’s been fixed via updates.

The root cause seems to be out of our control, but I’ve created a ticket about the secondary problem here, that Virtualmin silently let this failure pass by without loudly complaining about it.

I’m up to date. Strange.

I guess the problem hasn’t been fixed. There are unpleasant workarounds. This thread covers a couple of options (using pip to install awscli is probably the most reasonable).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.