Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1+

Using DigitalOcean Spaces or Amazon S3 for file storage in XF 2.1+

No permission to download
What actions do we need to take regarding the email they sent today?

[ACTION REQUIRED] - Update your S3 object access to maintain connectivity [AWS Account: ****]

To avoid potential interruption, you must update all client software accessing your Amazon S3 objects using TLS 1.0 or 1.1, to use TLS 1.2 or higher. If you are unable or would prefer to not update all impacted clients, we recommend replacing direct client access to the S3 objects with use of a proxy, such as an Amazon CloudFront distribution. This will allow clients to access your S3 objects via Amazon CloudFront using any TLS version you choose to allow. Amazon CloudFront will forward the calls to your S3 objects using TLS 1.2 or higher. For more guidance for how to setup your CloudFront distribution to front your S3 object access, please review this Knowledge Center article [2].
 
Last edited:
We’ve done some testing with this, whereby we set up a bucket policy to block anything below TLS 1.2 and everything continued to function.

So we don’t believe this should be an add-on or software issue exactly. Although make sure you’re using the latest version of this resource to ensure you’ve got the latest AWS SDK.

Failing that this may be a misconfiguration on your server or outdated OpenSSL
 
Hello,
We just upgraded to the latest version (deleted files and all) and receive the following error (running php 8):

Deprecated: Use of "self" in callables is deprecated in /var/www/html/src/addons/XFAws/_vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/ConfigurationProvider.php on line 83
 
Hello,
We just upgraded to the latest version (deleted files and all) and receive the following error (running php 8):

Deprecated: Use of "self" in callables is deprecated in /var/www/html/src/addons/XFAws/_vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/ConfigurationProvider.php on line 83
If you don't get it working you can try using @digitalpoint 's Cloudflare addon which supports storing the files on Cloudflare R2 and auto configures the bucket using settings inside Xenforo admin panel. Much less work than the convoluted settings on AWS if that's what you're interfacing.

 
Are you on PHP 8.2? That sounds like an 8.2 compatibility error. You could try downgrading to PHP 8.1 for now.
 
A few weeks ago I moved my hosting from Blue Host to AWS and I was using Digital Ocean Spaces for attachments.

I'm looking to get everything on AWS now and have run into one issue that I still need to figure up.

After copying the DO Space to my S3 bucket, I have found that any image that was transferred over is 403 unless I turn on all public access. Only images uploaded directly into the new AWS S3 bucket by the forum work with public access disabled.

How would I go about updating the permissions on all the older assets I transferred over?
 
after install addon and confing.php files things i am getting error

Code:
 Fatal error: Uncaught Error: Class 'GuzzleHttp\Promise\Create' not found in /var/www/vhosts/m-st.co/httpdocs/src/addons/XFAws/_vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php:126 Stack trace: #0 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/Promise.php(203): Aws\DefaultsMode\ConfigurationProvider::Aws\DefaultsMode\{closure}() #1 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler() #2 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/RejectedPromise.php(40): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #3 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}() #4 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run() #5 /var/www/vhosts/m-st.co/httpdocs/src/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\P in /var/www/vhosts/m-st.co/httpdocs/src/addons/XFAws/_vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php on line 126
 
Are there any tips or settings to reduce "AWS Data Transfer" costs? For some reason I had a very expensive month compared to the rest but the website traffic is not much different. Thanks
 
Are there any tips or settings to reduce "AWS Data Transfer" costs? For some reason I had a very expensive month compared to the rest but the website traffic is not much different. Thanks
I know not exactly the answer you are looking for, but Cloudflare’s R2 (S3 compatible) has no egress/transfer fees. Flat $0.015 per GB stored per month. Might be worth considering if in the long run you never pay for bandwidth/transfers again.
 
Ah cool. What does it entail to switch it over, some settings to plug in somewhere? I'm using this add-on with AWS directly. Thanks!
 
You setup a bucket in R2, then you can use something like rclone to copy all your objects from your S3 bucket to your R2 bucket. You can continue to use this addon simply by switching your credentials (R2 is S3 compatible, so the same underlying API calls will work).

If you want something a little more granular as far as control/stats, etc. you can use my Cloudflare addon, but fundamentally this addon will work for you as well since R2 is S3 compatible (I know, I already said that.. hah)
 
You can use Sippy to avoid migration egress fee.

That’s an option too, but better to just be done with it imo… then you aren’t paying for storage on the S3 side for months until everything is requested at least once.
 
You setup a bucket in R2, then you can use something like rclone to copy all your objects from your S3 bucket to your R2 bucket.
For me, rclone was probably the most difficult part...which is to say, with the Cloudflare addon, the whole process is simple enough that even I had no issues setting us up with R2 buckets. I had to do something extra for the XFMG addon but that was only a single addition to config.php.
 
Hello,
We just upgraded to the latest version (deleted files and all) and receive the following error (running php 8):

Deprecated: Use of "self" in callables is deprecated in /var/www/html/src/addons/XFAws/_vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/ConfigurationProvider.php on line 83
was able to resolve this by adding an updated aws-sdk-php and rebuilding addon for new hashes. the repo for the aws sdk is here: https://github.com/aws/aws-sdk-php/
 
You do not need this to be installed any more starting with XF 2.3.

Just uninstall.

This isn't and hasn't ever been a "mod". It simply provides the AWS SDK. This is now included with XF 2.3 by default (just the S3 bits).

To clarify, uninstall the mod after the XF 2.3 upgrade is complete (not before).
 
Top Bottom